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

Commit e157386

Browse files
corrected PR errors
1 parent 40c0039 commit e157386

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

keras_preprocessing/image/dataframe_iterator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ def __init__(self,
109109
save_format='png',
110110
subset=None,
111111
interpolation='nearest',
112+
resizing_function=None,
112113
dtype='float32',
113114
validate_filenames=True):
114115

@@ -120,7 +121,8 @@ def __init__(self,
120121
save_prefix,
121122
save_format,
122123
subset,
123-
interpolation)
124+
interpolation,
125+
resizing_function)
124126
df = dataframe.copy()
125127
self.directory = directory or ''
126128
self.class_mode = class_mode

keras_preprocessing/image/iterator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,8 @@ def _get_batches_of_transformed_samples(self, index_array):
241241
x = img_to_array(img, data_format=self.data_format)
242242
# NOTE: we could potentially have keyword arguments for the
243243
# resizing function
244-
x = self.resizing_function(x)
244+
if self.resizing_function is not None:
245+
x = self.resizing_function(x)
245246
if x.shape != self.image_shape:
246247
raise ValueError(
247248
'The loaded image shape %s (at %s) does not correspond to'

0 commit comments

Comments
 (0)