From 9ee82545668f6d3dfe666625727cf675217ca7dd Mon Sep 17 00:00:00 2001 From: Afroz Mohiuddin Date: Fri, 10 Jan 2020 16:28:16 -0800 Subject: [PATCH] Flush out some more contrib/slim. PiperOrigin-RevId: 289187366 --- tensor2tensor/data_generators/allen_brain.py | 4 ++-- tensor2tensor/data_generators/video_utils.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/tensor2tensor/data_generators/allen_brain.py b/tensor2tensor/data_generators/allen_brain.py index 67afce1dd..056f6a8f2 100644 --- a/tensor2tensor/data_generators/allen_brain.py +++ b/tensor2tensor/data_generators/allen_brain.py @@ -40,11 +40,11 @@ from tensor2tensor.data_generators import problem from tensor2tensor.data_generators import text_encoder from tensor2tensor.layers import modalities +from tensor2tensor.utils import contrib from tensor2tensor.utils import metrics from tensor2tensor.utils import registry import tensorflow as tf -from tensorflow.contrib import slim as contrib_slim _BASE_EXAMPLE_IMAGE_SIZE = 64 @@ -351,7 +351,7 @@ def example_reading_spec(self): data_items_to_decoders = { "targets": - contrib_slim.tfexample_decoder.Image( + contrib.slim().tfexample_decoder.Image( image_key="image/encoded", format_key="image/format", channels=self.num_channels), diff --git a/tensor2tensor/data_generators/video_utils.py b/tensor2tensor/data_generators/video_utils.py index b816ef8dc..4ea7e244c 100644 --- a/tensor2tensor/data_generators/video_utils.py +++ b/tensor2tensor/data_generators/video_utils.py @@ -32,10 +32,10 @@ from tensor2tensor.layers import common_layers from tensor2tensor.layers import common_video from tensor2tensor.layers import modalities +from tensor2tensor.utils import contrib from tensor2tensor.utils import metrics from tensor2tensor.utils import video_metrics import tensorflow as tf -from tensorflow.contrib import slim as contrib_slim FLAGS = flags.FLAGS @@ -385,7 +385,7 @@ def example_reading_spec(self): data_items_to_decoders = { "frame": - contrib_slim.tfexample_decoder.Image( + contrib.slim().tfexample_decoder.Image( image_key="image/encoded", format_key="image/format", shape=[self.frame_height, self.frame_width, self.num_channels], @@ -677,7 +677,7 @@ def example_reading_spec(self): data_items_to_decoders = { "inputs": - contrib_slim.tfexample_decoder.Image( + contrib.slim().tfexample_decoder.Image( image_key="image/encoded", format_key="image/format", channels=self.num_channels), @@ -766,7 +766,7 @@ def example_reading_spec(self): data_fields, data_items_to_decoders = ( super(Video2ClassProblem, self).example_reading_spec()) data_fields[label_key] = tf.FixedLenFeature((1,), tf.int64) - data_items_to_decoders["targets"] = contrib_slim.tfexample_decoder.Tensor( + data_items_to_decoders["targets"] = contrib.slim().tfexample_decoder.Tensor( label_key) return data_fields, data_items_to_decoders