Replace efficientnetv2 normalization layer

26 views
Skip to first unread message

Javier

unread,
Feb 19, 2025, 7:33:29 AMFeb 19
to Keras-users
Hello,
How can I replace the 'normalization' layer in order to update the imagenet mean and variance values with my own values to fine-tune with my dataset.
I tried this, but the trained model has the original imagenet values
model = NetB0(weights="imagenet", include_top=False)
norm_index = model.layers.index(model.get_layer('normalization'))
model.layers[norm_index] = keras.layers.Normalization(mean=new_mean, variance=new_variance)
model.compile...
model.fit...
Thanks

Reply all
Reply to author
Forward
0 new messages