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

fix support for numpy mmap backend (np.memmap) #200

Open
wants to merge 1 commit 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
3 changes: 2 additions & 1 deletion keras_preprocessing/image/image_data_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,8 @@ def flow(self,
save_to_dir=save_to_dir,
save_prefix=save_prefix,
save_format=save_format,
subset=subset
subset=subset,
dtype=x.dtype
)

def flow_from_directory(self,
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 @@ -109,7 +109,7 @@ def __init__(self,
if y is not None:
y = y[split_idx:]

self.x = np.asarray(x, dtype=self.dtype)
self.x = np.asanyarray(x, dtype=self.dtype)
self.x_misc = x_misc
if self.x.ndim != 4:
raise ValueError('Input data in `NumpyArrayIterator` '
Expand Down