Skip to content
This repository has been archived by the owner on Jul 7, 2023. It is now read-only.

Commit

Permalink
Flush out some more contrib/slim.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 289187366
  • Loading branch information
afrozenator authored and copybara-github committed Jan 11, 2020
1 parent c1b1478 commit 9ee8254
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions tensor2tensor/data_generators/allen_brain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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),
Expand Down
8 changes: 4 additions & 4 deletions tensor2tensor/data_generators/video_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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],
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 9ee8254

Please sign in to comment.