woodywff / brats_2019

A 3D U-Net Based Solution to BraTS 2019 in Keras
https://arxiv.org/abs/1909.12901
GNU General Public License v3.0
49 stars 15 forks source link

Why do you use sigmoid instead of softmax? #10

Open shifdz opened 3 years ago

shifdz commented 3 years ago

You use isensee2017_model for training, and the activation function is set to 'sigmoid'. Can you please explain why you use the 'sigmoid' activation function in the final layer when it is multi-class classification? Shouldn't it be 'softmax'?

(line 77 in brats_2019/unet3d/model/isensee2017.py /)

woodywff commented 3 years ago

Sorry for responding late. The output of the model is a 4D matrix, each channel of which is a 0-1 valued 3D image representing a certain kind of brain tumor area (WT, TC, ET). 1 indicates tumor voxel and 0 for non-tumor area and the background. That's why we use binary rather than multi-class classification. Of course you could also choose softmax and multi-classification method. Then you just need to replace the last part with a softmax layer and output a 3D matrix in which the value of a voxel could be 0,1,2, or 3.