Replies: 1 comment 3 replies
-
Hi, EfficientNetb4 for image classification is around 19M parameters, the fully connected layer is around 1.8M parameters which gets removed and then the decoder parameters are added. My guess is that tensorflow uses a different (larger) decoder and possibly doesnt remove the fully connected layer. |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello, I've been using segmentation_model developped by qubvel (thanks a lot!), written in tensorflow and keras. Recently, I've switched to Pytorch and been using segmentation_models_pytorch. When I do model.summary() on tensorflow version, the UNet with efficientnetb4 has 25M parameters, when in Pytorch version there is only 19M parameters. Why is this difference ? Thank you!
Here is the code in tensorflow:
model = sm.Unet(backbone_name = 'efficientnetb4',
input_shape = shape,
classes = 4,
activation = 'relu',
encoder_weights = 'imagenet')
model.summary()
Here is the code in Pytorch:
model = smp.Unet(encoder_name = 'efficientnet-b4'
encoder_weights = 'imagenet',
activation = nn.ReLU,
classes = 4,
decoder_attention_type = None)
Beta Was this translation helpful? Give feedback.
All reactions