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

Batch norm and image normalization in struct2depth #7604

Open
Yevkuzn opened this issue Sep 25, 2019 · 0 comments
Open

Batch norm and image normalization in struct2depth #7604

Yevkuzn opened this issue Sep 25, 2019 · 0 comments
Assignees
Labels
models:research models that come under research directory type:support

Comments

@Yevkuzn
Copy link

Yevkuzn commented Sep 25, 2019

  • What is the top-level directory of the model you are using: models/research/struct2depth
  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow): of course
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Fedora 30
  • TensorFlow installed from (source or binary): binary
  • TensorFlow version (use command below): 1.11
  • Bazel version (if compiling from source): -
  • CUDA/cuDNN version: 9.2 / 7.2.1
  • GPU model and memory: 1080 TI
  • Exact command to reproduce: python inference.py ...

Hi there,
I noticed that there is a connection between image normalization and the way batch norm is used during inference.

The issue #7343 indeed describes a bug and the image is not normalized before being fed to a neural network. This causes the effect described in issue #6927.

If using batch norm in train mode, the features are normalized using current batch statistics, which allows to compensate for absent image normalization. On the other hand, in test mode batch normalization is done with fixed statistics, which causes degraded performance on not normalized images.

If image normalization is fixed (e.g. as in #7342) and batch norm mode is set to test, quantitative results improve compared to those without image normalization and train mode batch norm.

BR
Yevhen

@gowthamkpr gowthamkpr added the models:research models that come under research directory label Sep 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
models:research models that come under research directory type:support
Projects
None yet
Development

No branches or pull requests

4 participants