You can use model.summary(expand_nested=True)
Output:
Model: "model"
_________________________________________________________________
Layer (type) Output Shape Param #
=================================================================
input_2 (InputLayer) [(None, 160, 160, 3)] 0
sequential (Sequential) (None, 160, 160, 3) 0
|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
| random_flip (RandomFlip) (None, 160, 160, 3) 0 |
| |
| random_rotation (RandomRota (None, 160, 160, 3) 0 |
| tion) |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
tf.math.truediv (TFOpLambda (None, 160, 160, 3) 0
)
tf.math.subtract (TFOpLambd (None, 160, 160, 3) 0
a)
mobilenetv2_1.00_160 (Funct (None, 5, 5, 1280) 2257984
ional)
|¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯|
| input_1 (InputLayer) [(None, 160, 160, 3)] 0 |
| |
| Conv1 (Conv2D) (None, 80, 80, 32) 864 |
| |
| bn_Conv1 (BatchNormalizatio (None, 80, 80, 32) 128 |
| n) |
| |
| Conv1_relu (ReLU) (None, 80, 80, 32) 0 |
| |
| expanded_conv_depthwise (De (None, 80, 80, 32) 288 |
| pthwiseConv2D) |
| |
| expanded_conv_depthwise_BN (None, 80, 80, 32) 128 |
| (BatchNormalization) |
| |
| expanded_conv_depthwise_rel (None, 80, 80, 32) 0 |
| u (ReLU) |
| |
| expanded_conv_project (Conv (None, 80, 80, 16) 512 |
| 2D) |
| |
| expanded_conv_project_BN (B (None, 80, 80, 16) 64 |
| atchNormalization) |
| |
| block_1_expand (Conv2D) (None, 80, 80, 96) 1536 |
| |
| block_1_expand_BN (BatchNor (None, 80, 80, 96) 384 |
| malization) |
| |
| block_1_expand_relu (ReLU) (None, 80, 80, 96) 0 |
| |
| block_1_pad (ZeroPadding2D) (None, 81, 81, 96) 0 |
| |
| block_1_depthwise (Depthwis (None, 40, 40, 96) 864 |
| eConv2D) |
| |
| block_1_depthwise_BN (Batch (None, 40, 40, 96) 384 |
| Normalization) |
| |
| block_1_depthwise_relu (ReL (None, 40, 40, 96) 0 |
| U) |
| |
| block_1_project (Conv2D) (None, 40, 40, 24) 2304 |
| |
| block_1_project_BN (BatchNo (None, 40, 40, 24) 96 |
| rmalization) |
| |
| block_2_expand (Conv2D) (None, 40, 40, 144) 3456 |
| |
| block_2_expand_BN (BatchNor (None, 40, 40, 144) 576 |
| malization) |
| |
| block_2_expand_relu (ReLU) (None, 40, 40, 144) 0 |
| |
| block_2_depthwise (Depthwis (None, 40, 40, 144) 1296 |
| eConv2D) |
| |
| block_2_depthwise_BN (Batch (None, 40, 40, 144) 576 |
| Normalization) |
| |
| block_2_depthwise_relu (ReL (None, 40, 40, 144) 0 |
| U) |
| |
| block_2_project (Conv2D) (None, 40, 40, 24) 3456 |
| |
| block_2_project_BN (BatchNo (None, 40, 40, 24) 96 |
| rmalization) |
| |
| block_2_add (Add) (None, 40, 40, 24) 0 |
| |
| block_3_expand (Conv2D) (None, 40, 40, 144) 3456 |
| |
| block_3_expand_BN (BatchNor (None, 40, 40, 144) 576 |
| malization) |
| |
| block_3_expand_relu (ReLU) (None, 40, 40, 144) 0 |
| |
| block_3_pad (ZeroPadding2D) (None, 41, 41, 144) 0 |
| |
| block_3_depthwise (Depthwis (None, 20, 20, 144) 1296 |
| eConv2D) |
| |
| block_3_depthwise_BN (Batch (None, 20, 20, 144) 576 |
| Normalization) |
| |
| block_3_depthwise_relu (ReL (None, 20, 20, 144) 0 |
| U) |
| |
| block_3_project (Conv2D) (None, 20, 20, 32) 4608 |
| |
| block_3_project_BN (BatchNo (None, 20, 20, 32) 128 |
| rmalization) |
| |
| block_4_expand (Conv2D) (None, 20, 20, 192) 6144 |
| |
| block_4_expand_BN (BatchNor (None, 20, 20, 192) 768 |
| malization) |
| |
| block_4_expand_relu (ReLU) (None, 20, 20, 192) 0 |
| |
| block_4_depthwise (Depthwis (None, 20, 20, 192) 1728 |
| eConv2D) |
| |
| block_4_depthwise_BN (Batch (None, 20, 20, 192) 768 |
| Normalization) |
| |
| block_4_depthwise_relu (ReL (None, 20, 20, 192) 0 |
| U) |
| |
| block_4_project (Conv2D) (None, 20, 20, 32) 6144 |
| |
| block_4_project_BN (BatchNo (None, 20, 20, 32) 128 |
| rmalization) |
| |
| block_4_add (Add) (None, 20, 20, 32) 0 |
| |
| block_5_expand (Conv2D) (None, 20, 20, 192) 6144 |
| |
| block_5_expand_BN (BatchNor (None, 20, 20, 192) 768 |
| malization) |
| |
| block_5_expand_relu (ReLU) (None, 20, 20, 192) 0 |
| |
| block_5_depthwise (Depthwis (None, 20, 20, 192) 1728 |
| eConv2D) |
| |
| block_5_depthwise_BN (Batch (None, 20, 20, 192) 768 |
| Normalization) |
| |
| block_5_depthwise_relu (ReL (None, 20, 20, 192) 0 |
| U) |
| |
| block_5_project (Conv2D) (None, 20, 20, 32) 6144 |
| |
| block_5_project_BN (BatchNo (None, 20, 20, 32) 128 |
| rmalization) |
| |
| block_5_add (Add) (None, 20, 20, 32) 0 |
| |
| block_6_expand (Conv2D) (None, 20, 20, 192) 6144 |
| |
| block_6_expand_BN (BatchNor (None, 20, 20, 192) 768 |
| malization) |
| |
| block_6_expand_relu (ReLU) (None, 20, 20, 192) 0 |
| |
| block_6_pad (ZeroPadding2D) (None, 21, 21, 192) 0 |
| |
| block_6_depthwise (Depthwis (None, 10, 10, 192) 1728 |
| eConv2D) |
| |
| block_6_depthwise_BN (Batch (None, 10, 10, 192) 768 |
| Normalization) |
| |
| block_6_depthwise_relu (ReL (None, 10, 10, 192) 0 |
| U) |
| |
| block_6_project (Conv2D) (None, 10, 10, 64) 12288 |
| |
| block_6_project_BN (BatchNo (None, 10, 10, 64) 256 |
| rmalization) |
| |
| block_7_expand (Conv2D) (None, 10, 10, 384) 24576 |
| |
| block_7_expand_BN (BatchNor (None, 10, 10, 384) 1536 |
| malization) |
| |
| block_7_expand_relu (ReLU) (None, 10, 10, 384) 0 |
| |
| block_7_depthwise (Depthwis (None, 10, 10, 384) 3456 |
| eConv2D) |
| |
| block_7_depthwise_BN (Batch (None, 10, 10, 384) 1536 |
| Normalization) |
| |
| block_7_depthwise_relu (ReL (None, 10, 10, 384) 0 |
| U) |
| |
| block_7_project (Conv2D) (None, 10, 10, 64) 24576 |
| |
| block_7_project_BN (BatchNo (None, 10, 10, 64) 256 |
| rmalization) |
| |
| block_7_add (Add) (None, 10, 10, 64) 0 |
| |
| block_8_expand (Conv2D) (None, 10, 10, 384) 24576 |
| |
| block_8_expand_BN (BatchNor (None, 10, 10, 384) 1536 |
| malization) |
| |
| block_8_expand_relu (ReLU) (None, 10, 10, 384) 0 |
| |
| block_8_depthwise (Depthwis (None, 10, 10, 384) 3456 |
| eConv2D) |
| |
| block_8_depthwise_BN (Batch (None, 10, 10, 384) 1536 |
| Normalization) |
| |
| block_8_depthwise_relu (ReL (None, 10, 10, 384) 0 |
| U) |
| |
| block_8_project (Conv2D) (None, 10, 10, 64) 24576 |
| |
| block_8_project_BN (BatchNo (None, 10, 10, 64) 256 |
| rmalization) |
| |
| block_8_add (Add) (None, 10, 10, 64) 0 |
| |
| block_9_expand (Conv2D) (None, 10, 10, 384) 24576 |
| |
| block_9_expand_BN (BatchNor (None, 10, 10, 384) 1536 |
| malization) |
| |
| block_9_expand_relu (ReLU) (None, 10, 10, 384) 0 |
| |
| block_9_depthwise (Depthwis (None, 10, 10, 384) 3456 |
| eConv2D) |
| |
| block_9_depthwise_BN (Batch (None, 10, 10, 384) 1536 |
| Normalization) |
| |
| block_9_depthwise_relu (ReL (None, 10, 10, 384) 0 |
| U) |
| |
| block_9_project (Conv2D) (None, 10, 10, 64) 24576 |
| |
| block_9_project_BN (BatchNo (None, 10, 10, 64) 256 |
| rmalization) |
| |
| block_9_add (Add) (None, 10, 10, 64) 0 |
| |
| block_10_expand (Conv2D) (None, 10, 10, 384) 24576 |
| |
| block_10_expand_BN (BatchNo (None, 10, 10, 384) 1536 |
| rmalization) |
| |
| block_10_expand_relu (ReLU) (None, 10, 10, 384) 0 |
| |
| block_10_depthwise (Depthwi (None, 10, 10, 384) 3456 |
| seConv2D) |
| |
| block_10_depthwise_BN (Batc (None, 10, 10, 384) 1536 |
| hNormalization) |
| |
| block_10_depthwise_relu (Re (None, 10, 10, 384) 0 |
| LU) |
| |
| block_10_project (Conv2D) (None, 10, 10, 96) 36864 |
| |
| block_10_project_BN (BatchN (None, 10, 10, 96) 384 |
| ormalization) |
| |
| block_11_expand (Conv2D) (None, 10, 10, 576) 55296 |
| |
| block_11_expand_BN (BatchNo (None, 10, 10, 576) 2304 |
| rmalization) |
| |
| block_11_expand_relu (ReLU) (None, 10, 10, 576) 0 |
| |
| block_11_depthwise (Depthwi (None, 10, 10, 576) 5184 |
| seConv2D) |
| |
| block_11_depthwise_BN (Batc (None, 10, 10, 576) 2304 |
| hNormalization) |
| |
| block_11_depthwise_relu (Re (None, 10, 10, 576) 0 |
| LU) |
| |
| block_11_project (Conv2D) (None, 10, 10, 96) 55296 |
| |
| block_11_project_BN (BatchN (None, 10, 10, 96) 384 |
| ormalization) |
| |
| block_11_add (Add) (None, 10, 10, 96) 0 |
| |
| block_12_expand (Conv2D) (None, 10, 10, 576) 55296 |
| |
| block_12_expand_BN (BatchNo (None, 10, 10, 576) 2304 |
| rmalization) |
| |
| block_12_expand_relu (ReLU) (None, 10, 10, 576) 0 |
| |
| block_12_depthwise (Depthwi (None, 10, 10, 576) 5184 |
| seConv2D) |
| |
| block_12_depthwise_BN (Batc (None, 10, 10, 576) 2304 |
| hNormalization) |
| |
| block_12_depthwise_relu (Re (None, 10, 10, 576) 0 |
| LU) |
| |
| block_12_project (Conv2D) (None, 10, 10, 96) 55296 |
| |
| block_12_project_BN (BatchN (None, 10, 10, 96) 384 |
| ormalization) |
| |
| block_12_add (Add) (None, 10, 10, 96) 0 |
| |
| block_13_expand (Conv2D) (None, 10, 10, 576) 55296 |
| |
| block_13_expand_BN (BatchNo (None, 10, 10, 576) 2304 |
| rmalization) |
| |
| block_13_expand_relu (ReLU) (None, 10, 10, 576) 0 |
| |
| block_13_pad (ZeroPadding2D (None, 11, 11, 576) 0 |
| ) |
| |
| block_13_depthwise (Depthwi (None, 5, 5, 576) 5184 |
| seConv2D) |
| |
| block_13_depthwise_BN (Batc (None, 5, 5, 576) 2304 |
| hNormalization) |
| |
| block_13_depthwise_relu (Re (None, 5, 5, 576) 0 |
| LU) |
| |
| block_13_project (Conv2D) (None, 5, 5, 160) 92160 |
| |
| block_13_project_BN (BatchN (None, 5, 5, 160) 640 |
| ormalization) |
| |
| block_14_expand (Conv2D) (None, 5, 5, 960) 153600 |
| |
| block_14_expand_BN (BatchNo (None, 5, 5, 960) 3840 |
| rmalization) |
| |
| block_14_expand_relu (ReLU) (None, 5, 5, 960) 0 |
| |
| block_14_depthwise (Depthwi (None, 5, 5, 960) 8640 |
| seConv2D) |
| |
| block_14_depthwise_BN (Batc (None, 5, 5, 960) 3840 |
| hNormalization) |
| |
| block_14_depthwise_relu (Re (None, 5, 5, 960) 0 |
| LU) |
| |
| block_14_project (Conv2D) (None, 5, 5, 160) 153600 |
| |
| block_14_project_BN (BatchN (None, 5, 5, 160) 640 |
| ormalization) |
| |
| block_14_add (Add) (None, 5, 5, 160) 0 |
| |
| block_15_expand (Conv2D) (None, 5, 5, 960) 153600 |
| |
| block_15_expand_BN (BatchNo (None, 5, 5, 960) 3840 |
| rmalization) |
| |
| block_15_expand_relu (ReLU) (None, 5, 5, 960) 0 |
| |
| block_15_depthwise (Depthwi (None, 5, 5, 960) 8640 |
| seConv2D) |
| |
| block_15_depthwise_BN (Batc (None, 5, 5, 960) 3840 |
| hNormalization) |
| |
| block_15_depthwise_relu (Re (None, 5, 5, 960) 0 |
| LU) |
| |
| block_15_project (Conv2D) (None, 5, 5, 160) 153600 |
| |
| block_15_project_BN (BatchN (None, 5, 5, 160) 640 |
| ormalization) |
| |
| block_15_add (Add) (None, 5, 5, 160) 0 |
| |
| block_16_expand (Conv2D) (None, 5, 5, 960) 153600 |
| |
| block_16_expand_BN (BatchNo (None, 5, 5, 960) 3840 |
| rmalization) |
| |
| block_16_expand_relu (ReLU) (None, 5, 5, 960) 0 |
| |
| block_16_depthwise (Depthwi (None, 5, 5, 960) 8640 |
| seConv2D) |
| |
| block_16_depthwise_BN (Batc (None, 5, 5, 960) 3840 |
| hNormalization) |
| |
| block_16_depthwise_relu (Re (None, 5, 5, 960) 0 |
| LU) |
| |
| block_16_project (Conv2D) (None, 5, 5, 320) 307200 |
| |
| block_16_project_BN (BatchN (None, 5, 5, 320) 1280 |
| ormalization) |
| |
| Conv_1 (Conv2D) (None, 5, 5, 1280) 409600 |
| |
| Conv_1_bn (BatchNormalizati (None, 5, 5, 1280) 5120 |
| on) |
| |
| out_relu (ReLU) (None, 5, 5, 1280) 0 |
¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
global_average_pooling2d (G (None, 1280) 0
lobalAveragePooling2D)
dropout (Dropout) (None, 1280) 0
dense (Dense) (None, 1) 1281
=================================================================
Total params: 2,259,265
Trainable params: 1,281
Non-trainable params: 2,257,984
_________________________________________________________________
Please refer to the gist. Thank you