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

Commit

Permalink
corrected PR errors
Browse files Browse the repository at this point in the history
  • Loading branch information
zaccharieramzi committed Dec 8, 2019
1 parent c7749af commit 9022959
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion keras_preprocessing/image/dataframe_iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ def __init__(self,
save_format='png',
subset=None,
interpolation='nearest',
resizing_function=None,
dtype='float32',
validate_filenames=True):

Expand All @@ -120,7 +121,8 @@ def __init__(self,
save_prefix,
save_format,
subset,
interpolation)
interpolation,
resizing_function)
df = dataframe.copy()
self.directory = directory or ''
self.class_mode = class_mode
Expand Down
3 changes: 2 additions & 1 deletion keras_preprocessing/image/iterator.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,8 @@ def _get_batches_of_transformed_samples(self, index_array):
x = img_to_array(img, data_format=self.data_format)
# NOTE: we could potentially have keyword arguments for the
# resizing function
x = self.resizing_function(x)
if self.resizing_function is not None:
x = self.resizing_function(x)
if x.shape != self.image_shape:
raise ValueError(
'The loaded image shape %s (at %s) does not correspond to'
Expand Down

0 comments on commit 9022959

Please sign in to comment.