diff --git a/tensor2tensor/data_generators/video_utils.py b/tensor2tensor/data_generators/video_utils.py index 46bc80acf..f8e7ef26e 100644 --- a/tensor2tensor/data_generators/video_utils.py +++ b/tensor2tensor/data_generators/video_utils.py @@ -140,7 +140,7 @@ def use_not_breaking_batching(self): def preprocess_example(self, example, mode, hparams): """Runtime preprocessing, e.g., resize example["frame"].""" - if hparams.preprocess_resize_frames is not None: + if getattr(hparams, "preprocess_resize_frames", None) is not None: example["frame"] = tf.image.resize_images( example["frame"], hparams.preprocess_resize_frames,