Project-MONAI / MONAI

AI Toolkit for Healthcare Imaging

Home Page:https://monai.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to modify the last layer output of the UNet from MONAI to be processed with a sigmoid activation for the output?

Guoxt opened this issue · comments

How to modify the last layer output of the UNet from MONAI to be processed with a sigmoid activation for the output?

from monai.networks.nets import UNet

Hi @Guoxt, please try to use Activations.
https://github.com/Project-MONAI/MONAI/blob/dev/monai/transforms/post/array.py#L66

You can find an example here: https://github.com/Project-MONAI/tutorials/blob/main/3d_segmentation/brats_segmentation_3d.ipynb

Thanks.
(move to the discussion, more like a usage issue.)