diff options
author | Alexandre Passos <apassos@google.com> | 2017-10-24 17:00:23 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-10-24 17:03:38 -0700 |
commit | 56ceca431454635e8ea456cb35f9aeb7f62a8948 (patch) | |
tree | 4940ef8066e5881375e9d0f559469975284cfdec /tensorflow/python/layers/normalization.py | |
parent | 8e7390ff4e0d9d173df5e193bf90af934e42f193 (diff) |
Disables storing variables in the default variable store for eager.
Also disables all functional layers until a non-default store is
implemented.
PiperOrigin-RevId: 173333446
Diffstat (limited to 'tensorflow/python/layers/normalization.py')
-rw-r--r-- | tensorflow/python/layers/normalization.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tensorflow/python/layers/normalization.py b/tensorflow/python/layers/normalization.py index 74246189b5..899be08020 100644 --- a/tensorflow/python/layers/normalization.py +++ b/tensorflow/python/layers/normalization.py @@ -717,7 +717,14 @@ def batch_normalization(inputs, Returns: Output tensor. + + Raises: + ValueError: if eager execution is enabled. """ + if context.in_eager_mode(): + raise ValueError( + 'Functional layers are currently not compatible with eager execution.' + 'Use tf.layers.BactchNormalization instead.') layer = BatchNormalization( axis=axis, momentum=momentum, @@ -749,4 +756,3 @@ def batch_normalization(inputs, BatchNorm = BatchNormalization batch_norm = batch_normalization - |