mirror of
https://github.com/google-deepmind/deepmind-research.git
synced 2026-05-31 13:05:40 +08:00
Make TensorFlow imports compatible with TF 1.14.
PiperOrigin-RevId: 289424199
This commit is contained in:
committed by
Diego de Las Casas
parent
3c6b08d3ca
commit
25a0bc935f
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user