Skip to content

Commit

Permalink
Merge pull request #18 from buesma/patch-1
Browse files Browse the repository at this point in the history
Added missing seed in data_reader.
  • Loading branch information
fabioviola authored Feb 17, 2021
2 parents acca9db + 3a96cb7 commit cf2ff94
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data_reader.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,15 +219,15 @@ def _make_read_op(self, reader, filename_queue):
dtype=tf.float32)
}
example = tf.parse_example(raw_data, feature_map)
indices = self._get_randomized_indices()
indices = self._get_randomized_indices(seed)
frames = self._preprocess_frames(example, indices)
cameras = self._preprocess_cameras(example, indices)
return frames, cameras

def _get_randomized_indices(self):
def _get_randomized_indices(self, seed):
"""Generates randomized indices into a sequence of a specific length."""
indices = tf.range(0, self._dataset_info.sequence_size)
indices = tf.random_shuffle(indices)
indices = tf.random_shuffle(indices, seed=seed)
indices = tf.slice(indices, begin=[0], size=[self._example_size])
return indices

Expand Down

0 comments on commit cf2ff94

Please sign in to comment.