ZFTurbo / ZF_UNET_224_Pretrained_Model

Modification of convolutional neural net "UNET" for image segmentation in Keras framework
GNU General Public License v3.0
214 stars 64 forks source link

What is motivation of using sigmoid at last layer? #1

Closed mrgloom closed 7 years ago

mrgloom commented 7 years ago

What is motivation of using sigmoid at last layer? https://github.com/ZFTurbo/ZF_UNET_224_Pretrained_Model/blob/master/zf_unet_224_model.py#L105

ZFTurbo commented 7 years ago

It's suitable for the case where masks in different channels can overlap. For single output channel it's the same as softmax. Also softmax can't be used directly for 2D output in Keras.

mrgloom commented 6 years ago

Also softmax can't be used directly for 2D output in Keras.

Looks like reshape is not needed in case of softmax+categorical_crossentropy too, it just applied by last dimension.