Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to default tf.keras.layers.BatchNormalization #188

Merged
merged 1 commit into from
Apr 30, 2020

Conversation

Maxinho96
Copy link
Contributor

As stated in the official tf documentation, now setting trainable=False will run the BatchNormalization layer in inference mode, so when the layer is frozen it will use moving mean and moving variance instead of current batch mean and variance:
https://www.tensorflow.org/api_docs/python/tf/keras/layers/BatchNormalization

So, there is no need to use a custom BatchNormalization layer anymore.

As stated in the official tf documentation, now setting trainable=False will run the layer in inference mode, so when the layer is frozen it will use moving mean and moving variance instead of current batch mean and variance:
https://www.tensorflow.org/api_docs/python/tf/keras/layers/BatchNormalization

So, there is no need to use a custom BatchNormalization layer anymore.
@zzh8829
Copy link
Owner

zzh8829 commented Apr 30, 2020

thats a great news

@zzh8829 zzh8829 merged commit c940823 into zzh8829:master Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants