Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Passing seed to get random transform function #298

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion keras_preprocessing/image/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ def _get_batches_of_transformed_samples(self, index_array):
if hasattr(img, 'close'):
img.close()
if self.image_data_generator:
params = self.image_data_generator.get_random_transform(x.shape)
params = self.image_data_generator.get_random_transform(x.shape, self.seed)
x = self.image_data_generator.apply_transform(x, params)
x = self.image_data_generator.standardize(x)
batch_x[i] = x
Expand Down
2 changes: 1 addition & 1 deletion keras_preprocessing/image/numpy_array_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ def _get_batches_of_transformed_samples(self, index_array):
dtype=self.dtype)
for i, j in enumerate(index_array):
x = self.x[j]
params = self.image_data_generator.get_random_transform(x.shape)
params = self.image_data_generator.get_random_transform(x.shape, self.seed)
x = self.image_data_generator.apply_transform(
x.astype(self.dtype), params)
x = self.image_data_generator.standardize(x)
Expand Down