Make TensorFlow imports compatible with TF 1.14.

PiperOrigin-RevId: 289424199
This commit is contained in:
Augustin Zidek
2020-01-13 13:45:38 +00:00
committed by Diego de Las Casas
parent 3c6b08d3ca
commit 25a0bc935f
12 changed files with 26 additions and 35 deletions
+2 -3
View File
@@ -15,8 +15,7 @@
"""Two dimensional convolutional neural net layers."""
from absl import logging
import tensorflow.compat.v1 as tf
from tensorflow.contrib import layers as contrib_layers
import tensorflow as tf # pylint: disable=g-explicit-tensorflow-version-import
def weight_variable(shape, stddev=0.01):
@@ -92,7 +91,7 @@ def make_conv_sep2d_layer(input_node,
def batch_norm_layer(h_conv, layer_name, is_training=True, data_format='NCHW'):
"""Batch norm layer."""
logging.vlog(1, 'batch norm for layer %s', layer_name)
return contrib_layers.batch_norm(
return tf.contrib.layers.batch_norm(
h_conv,
is_training=is_training,
fused=True,