1 Like
In function create_pre_trained_model
, you should write code to address this step:
# Make all the layers in the pre-trained model non-trainable
1 Like
Thank u @balaji.ambresh sir, will try
Thank u so very much. I found the error. Million thanks again
I used the for loop to set layer.trainable=False
, however my outputs are not matching the expected value:
The last few lines of my output
batch_normalization_93 (BatchN (None, 3, 3, 192) 576 ['conv2d_93[0][0]']
ormalization)
activation_85 (Activation) (None, 3, 3, 320) 0 ['batch_normalization_85[0][0]']
mixed9_1 (Concatenate) (None, 3, 3, 768) 0 ['activation_87[0][0]',
'activation_88[0][0]']
concatenate_1 (Concatenate) (None, 3, 3, 768) 0 ['activation_91[0][0]',
'activation_92[0][0]']
activation_93 (Activation) (None, 3, 3, 192) 0 ['batch_normalization_93[0][0]']
mixed10 (Concatenate) (None, 3, 3, 2048) 0 ['activation_85[0][0]',
'mixed9_1[0][0]',
'concatenate_1[0][0]',
'activation_93[0][0]']
==================================================================================================
Total params: 21,802,784
Trainable params: 0
Non-trainable params: 21,802,784
The expected value:
batch_normalization_v1_281 (Bat (None, 3, 3, 192) 576 conv2d_281[0][0]
__________________________________________________________________________________________________
activation_273 (Activation) (None, 3, 3, 320) 0 batch_normalization_v1_273[0][0]
__________________________________________________________________________________________________
mixed9_1 (Concatenate) (None, 3, 3, 768) 0 activation_275[0][0]
activation_276[0][0]
__________________________________________________________________________________________________
concatenate_5 (Concatenate) (None, 3, 3, 768) 0 activation_279[0][0]
activation_280[0][0]
__________________________________________________________________________________________________
activation_281 (Activation) (None, 3, 3, 192) 0 batch_normalization_v1_281[0][0]
__________________________________________________________________________________________________
mixed10 (Concatenate) (None, 3, 3, 2048) 0 activation_273[0][0]
mixed9_1[0][0]
concatenate_5[0][0]
activation_281[0][0]
The total params number matches but they layers do not match in name. Are layer names random, or has the model we imported been modified?