Commit 9e2dd0ab authored by Nathan Luehr's avatar Nathan Luehr Committed by Martin Wicke
Browse files

Add fp16 support to fused batchnorm op (#13388)

* Add fp16 support to fused batchnorm op

- This commit adds a mixed-precision fused_batch_norm_v2 op.
  The inputs and outputs are fp16, while the scale, offset, mean
  and variance are kept in fp32.
- The tf.nn.fused_batch_norm op has been modified to use the v2
  fused batchnorm whenever inputs are fp16 (this does not affect
  compatibility because fp16 was not previously supported).
- The high-level layers APIs have also been updated to store the
  scale, offset, mean, and variance variables as fp32.

* Added fp16 batchnorm tests

* Fixed whitespace issue

* Fix unnecessary BatchNormalization API change
parent 4a41e7bc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment