UNetPlusPlus icon indicating copy to clipboard operation
UNetPlusPlus copied to clipboard

3x3 sigmoid/softmax output.

Open JakobKHAndersen opened this issue 4 years ago • 2 comments

Hello

I was wondering what the rational is for using 3x3 convolutions as opposed to 1x1 convolutions in the output layer. As far as i know, the original U-net paper uses 1x1 sigmoid/softmax neurons in the output for pixelwise classification, but in you implementation you use 3x3. Why is that?

JakobKHAndersen avatar Jan 23 '21 09:01 JakobKHAndersen

Hi @DBAFC

Which implementation did you refer to? I think I used 1x1 convolutions in the output layer as well.

See https://github.com/MrGiovanni/UNetPlusPlus/blob/master/keras/helper_functions.py#L135 unet_output = Conv2D(num_class, (1, 1), activation='sigmoid', name='output', kernel_initializer = 'he_normal', padding='same', kernel_regularizer=l2(1e-4))(conv1_5)

https://github.com/MrGiovanni/UNetPlusPlus/blob/master/keras/helper_functions.py#L269 nestnet_output_4 = Conv2D(num_class, (1, 1), activation='sigmoid', name='output_4', kernel_initializer = 'he_normal', padding='same', kernel_regularizer=l2(1e-4))(conv1_5)

MrGiovanni avatar Jan 24 '21 17:01 MrGiovanni

Hi

This is the model i'm referring to:

https://github.com/MrGiovanni/UNetPlusPlus/blob/master/keras/segmentation_models/unet/builder.py

JakobKHAndersen avatar Jan 25 '21 08:01 JakobKHAndersen