Use nn.function.one_hot for one_hot calulcation
Description
Use nn.function.one_hot for one_hot calulcation in utils
Status
Ready
Types of changes
- [x] Non-breaking change (fix or new feature that would not break existing functionality).
- [ ] Breaking change (fix or new feature that would cause existing functionality to change).
- [ ] New tests added to cover the changes.
- [x] Integration tests passed locally by running
./runtests.sh -f -u --net --coverage. - [x] Quick tests passed locally by running
./runtests.sh --quick --unittests --disttests. - [x] In-line docstrings updated.
- [ ] Documentation updated, tested
make htmlcommand in thedocs/folder.
I got the following error with make html.
writing output... [ 3%] api
Theme error:
An error happened in rendering the page api.
Reason: TypeError('quote_from_bytes() expected bytes')
make: *** [Makefile:23: html] Error 2
Hi @wyli ,
Do you have any idea about the doc error?
Thanks.
Hi @rabinadk1 ,
Please take a look at the CI tests in this PR, I see the make html is: build succeeded.
Maybe something wrong in your local environment?
Thanks.
the previous change of this was because of efficiency https://github.com/Project-MONAI/MONAI/pull/486, is this PR verified for the same?
the version with nn.functional.one_hot was much slower if someone can retest it (time it for 3D images) , we could consider the change but I see now reason to change it
Current version seems to be faster.