# Number of parameters in Resnet-50

I'm using Keras, and I am struggling to know how many parameters Resnet-50 has. Keras documentation says around 25M, while if I use model.param_count() when loading a Resnet-50 model, it says 234M. Which one is correct? I'm confused.

model.summary prints this:

Total params: 234,355,586
Trainable params: 210,767,874
Non-trainable params: 23,587,712

• call model.summary, there's no way it hat 230 million trainable parameters – Brale May 10 '20 at 20:54
• The number of parameters depends on your input size and number of classes. Like @Brale_ said call model.summary() to be sure. – Djib2011 May 10 '20 at 22:20
• How is model.summary() different from param_count()? – Tina J May 11 '20 at 4:04
• Total params: 234,355,586 ... Trainable params: 210,767,874... Non-trainable params: 23,587,712 – Tina J May 11 '20 at 4:06

from keras.applications.resnet50 import ResNet50

resnet_model = ResNet50(weights='imagenet')

#resnet_model.count_params()
resnet_model.summary()


Total params: 25,636,712
Trainable params: 25,583,592
Non-trainable params: 53,120

Check your code once to be sure that it is ResNet50

Call model_name.summary()

This will return you the correct value for the total number of parameters.

• That's what I did (look above). It's a saved fine-tuned model from ResNet-50. It shouldn't change the number of parameters, right? – Tina J May 11 '20 at 17:38
• Well, typically a ResNet-50 contains around 25.6 million parameters including trainable parameters, maybe you didn't load the correct model, the number of parameters should never be that much – AKIB MOHAMMED KHAN May 12 '20 at 22:41