|
32 | 32 | from tensor2tensor.layers import common_layers
|
33 | 33 | from tensor2tensor.layers import common_video
|
34 | 34 | from tensor2tensor.layers import modalities
|
| 35 | +from tensor2tensor.utils import contrib |
35 | 36 | from tensor2tensor.utils import metrics
|
36 | 37 | from tensor2tensor.utils import video_metrics
|
37 | 38 | import tensorflow as tf
|
38 |
| -from tensorflow.contrib import slim as contrib_slim |
39 | 39 |
|
40 | 40 |
|
41 | 41 | FLAGS = flags.FLAGS
|
@@ -385,7 +385,7 @@ def example_reading_spec(self):
|
385 | 385 |
|
386 | 386 | data_items_to_decoders = {
|
387 | 387 | "frame":
|
388 |
| - contrib_slim.tfexample_decoder.Image( |
| 388 | + contrib.slim().tfexample_decoder.Image( |
389 | 389 | image_key="image/encoded",
|
390 | 390 | format_key="image/format",
|
391 | 391 | shape=[self.frame_height, self.frame_width, self.num_channels],
|
@@ -677,7 +677,7 @@ def example_reading_spec(self):
|
677 | 677 |
|
678 | 678 | data_items_to_decoders = {
|
679 | 679 | "inputs":
|
680 |
| - contrib_slim.tfexample_decoder.Image( |
| 680 | + contrib.slim().tfexample_decoder.Image( |
681 | 681 | image_key="image/encoded",
|
682 | 682 | format_key="image/format",
|
683 | 683 | channels=self.num_channels),
|
@@ -766,7 +766,7 @@ def example_reading_spec(self):
|
766 | 766 | data_fields, data_items_to_decoders = (
|
767 | 767 | super(Video2ClassProblem, self).example_reading_spec())
|
768 | 768 | data_fields[label_key] = tf.FixedLenFeature((1,), tf.int64)
|
769 |
| - data_items_to_decoders["targets"] = contrib_slim.tfexample_decoder.Tensor( |
| 769 | + data_items_to_decoders["targets"] = contrib.slim().tfexample_decoder.Tensor( |
770 | 770 | label_key)
|
771 | 771 | return data_fields, data_items_to_decoders
|
772 | 772 |
|
|
0 commit comments