Skip to main content
added 893 characters in body
Source Link
Robert Long
  • 2k
  • 11
  • 23

As per the comment by Pedro Henrique Monforte, since the OP has had plenty of time to do it themselves, I am thus turning the "answer" edited into the OP into an actual answer:

as is turns out, not even the model's initial creator could successfully fine-tune it. This is most likely a problem of implementation, or possibly related to the non-intuitive way in which the Keras batch normalization layer works.

The OP's answer links to this page:

https://blog.datumbox.com/the-batch-normalization-layer-of-keras-is-broken/

...which describes issues with Keras’s Batch Normalization (BN) layer, especially when used with Transfer Learning. The BN layer, critical in deep learning for faster training and mitigating vanishing gradients, behaves differently in training and inference modes. In Keras, when BN layers are frozen, they incorrectly use mini-batch statistics during training instead of pre-learned mean and variance, causing problems in Transfer Learning, where layers are reused with new data. The author suggests modifying the BN layer to rely on the original dataset's statistics when frozen, ensuring consistent data scaling and more accurate predictions.

Finally, the author's guthub page that implements their ideas is here

As per the comment by Pedro Henrique Monforte, I am turning the "answer" edited into the OP into an actual answer:

as is turns out, not even the model's initial creator could successfully fine-tune it. This is most likely a problem of implementation, or possibly related to the non-intuitive way in which the Keras batch normalization layer works.

https://blog.datumbox.com/the-batch-normalization-layer-of-keras-is-broken/

As per the comment by Pedro Henrique Monforte, since the OP has had plenty of time to do it themselves, I am thus turning the "answer" edited into the OP into an actual answer:

as is turns out, not even the model's initial creator could successfully fine-tune it. This is most likely a problem of implementation, or possibly related to the non-intuitive way in which the Keras batch normalization layer works.

The OP's answer links to this page:

https://blog.datumbox.com/the-batch-normalization-layer-of-keras-is-broken/

...which describes issues with Keras’s Batch Normalization (BN) layer, especially when used with Transfer Learning. The BN layer, critical in deep learning for faster training and mitigating vanishing gradients, behaves differently in training and inference modes. In Keras, when BN layers are frozen, they incorrectly use mini-batch statistics during training instead of pre-learned mean and variance, causing problems in Transfer Learning, where layers are reused with new data. The author suggests modifying the BN layer to rely on the original dataset's statistics when frozen, ensuring consistent data scaling and more accurate predictions.

Finally, the author's guthub page that implements their ideas is here

Source Link
Robert Long
  • 2k
  • 11
  • 23

As per the comment by Pedro Henrique Monforte, I am turning the "answer" edited into the OP into an actual answer:

as is turns out, not even the model's initial creator could successfully fine-tune it. This is most likely a problem of implementation, or possibly related to the non-intuitive way in which the Keras batch normalization layer works.

https://blog.datumbox.com/the-batch-normalization-layer-of-keras-is-broken/