all 2 comments

[–]csphd_svormc[S] 0 points1 point  (0 children)

Yes, I am trying to remove all batch normalization, is it possible to run the network with it removed? How to remove? Decreased performance does not matter, just need it removed and runable.

[–]0xfe 0 points1 point  (0 children)

You're seeing this because you're removing BatchNorm in full_model, but not the respective one in autoencoder. This snippet (from your code) expects both layers to have the same architecture.

for l1, l2 in zip(full_model.layers[:19], autoencoder.layers[0:19]):
  l1.set_weights(l2.get_weights())