Skip to content

Commit

Permalink
Internal changes to tf.contrib symbols
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 277929284
  • Loading branch information
Deepmind Team authored and diegolascasas committed Nov 1, 2019
1 parent 9cf7599 commit b308a9c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions transporter/transporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@

import sonnet as snt
import tensorflow as tf
from tensorflow.contrib import framework as contrib_framework
from tensorflow.contrib import layers as contrib_layers

nest = tf.contrib.framework.nest
nest = contrib_framework.nest

# Paper submission used BatchNorm, but we have since found that Layer & Instance
# norm can be quite a lot more stable.
Expand Down Expand Up @@ -189,7 +191,7 @@ def _build(self, image, is_training):
A tensor of features of shape [B, F_h, F_w, N] where F_h and F_w are the
height and width of the feature map and N = 4 * `self._filters`
"""
regularizers = {"w": tf.contrib.layers.l2_regularizer(1.0)}
regularizers = {"w": contrib_layers.l2_regularizer(1.0)}

features = image
for l in range(len(self._filters)):
Expand Down Expand Up @@ -257,7 +259,7 @@ def _build(self, image, is_training):
conv = snt.Conv2D(
self._num_keypoints, [1, 1],
stride=1,
regularizers={"w": tf.contrib.layers.l2_regularizer(1.0)},
regularizers={"w": contrib_layers.l2_regularizer(1.0)},
name="conv_1/conv_1")

image_features = self._keypoint_encoder(image, is_training=is_training)
Expand Down Expand Up @@ -400,7 +402,7 @@ def _build(self, features, is_training):
height, width = features.shape.as_list()[1:3]

filters = self._initial_filters
regularizers = {"w": tf.contrib.layers.l2_regularizer(1.0)}
regularizers = {"w": contrib_layers.l2_regularizer(1.0)}

layer = 0

Expand Down Expand Up @@ -458,4 +460,3 @@ def _build(self, features, is_training):
assert width == self._output_width

return features

0 comments on commit b308a9c

Please sign in to comment.