…ot encoding of labels, and simply applying sigmoid to map to [0,1] otherwise.
Within the outconv layer of pt_3dresunet, a softmax was being applied (along axis=1) just before the output. This is appropriate for the non-binary classification case (when output is one-hot encoded), but produces a 1.0 output in the case of single channel output.
Proposed Changes
Pass the binary_classification boolean from the model to the outconv layer
When binary_classification is True, apply sigmoid, otherwise softmax along axis=1 as before.
Incorporate a check in the data object that if performing binary classification make sure that the values in the class map are exactly {0, 1} as values outside of [0, 1] will not be reachable with this use of sigmoid.
…ot encoding of labels, and simply applying sigmoid to map to [0,1] otherwise.
Within the outconv layer of pt_3dresunet, a softmax was being applied (along axis=1) just before the output. This is appropriate for the non-binary classification case (when output is one-hot encoded), but produces a 1.0 output in the case of single channel output.
Proposed Changes