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

TF Batch Normalization should use FusedBatchNorm when axis = -1 #10742

Merged
merged 1 commit into from
Jul 23, 2018

Conversation

yanboliang
Copy link
Contributor

@yanboliang yanboliang commented Jul 21, 2018

Summary

When applying BatchNormalization to Conv2D, TF backend try to use FusedBatchNorm for optimization(when axis=1 and axis=3), we should cover their equivalent condition(axis=-3 and axis=-1) as well. Since the default value for axis is -1, it's common case that users don't set axis explicitly, then they won't get optimized code route before this fix.

Related Issues

PR Overview

  • This PR requires new unit tests [y/n] (make sure tests are included)
  • This PR requires to update the documentation [y/n] (make sure the docs are up-to-date)
  • This PR is backwards compatible [y/n]
  • This PR changes the current API [y/n] (all API changes need to be approved by fchollet)

@fchollet fchollet merged commit d4c1f69 into keras-team:master Jul 23, 2018
@yanboliang yanboliang deleted the bn-axis branch July 23, 2018 19:29
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