Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why do you use sigmoid instead of softmax? #10

Open
shifdz opened this issue Jun 26, 2021 · 1 comment
Open

Why do you use sigmoid instead of softmax? #10

shifdz opened this issue Jun 26, 2021 · 1 comment

Comments

@shifdz
Copy link

shifdz commented Jun 26, 2021

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
Copy link
Owner

woodywff commented Jul 5, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants