Please make sure that the boxes below are checked before you submit your issue.
If your issue is an implementation question, please ask your question on StackOverflow or on the Keras Slack channel instead of opening a GitHub issue.
Thank you!
[v ] Check that you are up-to-date with the master branch of keras-preprocessing. You can update with:
pip install git+git://github.com/keras-team/keras-preprocessing.git --upgrade --no-deps
[ ] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short).
from keras.models import load_model
from keras.preprocessing.image import ImageDataGenerator
test_datagen=ImageDataGenerator(rescale=1./255,preprocessing_function="gray_to_rgb")
test_generator=test_datagen.flow_from_directory(
directory=data_path,
target_size=(256,256),
color_mode="rgb",
shuffle=False,# keep data in same order as label
class_mode="categorical",
batch_size=16)
print("test_generator",test_generator)
model=load_model(model_path)
Please make sure that the boxes below are checked before you submit your issue. If your issue is an implementation question, please ask your question on StackOverflow or on the Keras Slack channel instead of opening a GitHub issue.
Thank you!
[v ] Check that you are up-to-date with the master branch of keras-preprocessing. You can update with:
pip install git+git://github.com/keras-team/keras-preprocessing.git --upgrade --no-deps
[ ] Provide a link to a GitHub Gist of a Python script that can reproduce your issue (or just copy the script here if it is short). from keras.models import load_model from keras.preprocessing.image import ImageDataGenerator test_datagen=ImageDataGenerator(rescale=1./255,preprocessing_function="gray_to_rgb") test_generator=test_datagen.flow_from_directory( directory=data_path, target_size=(256,256), color_mode="rgb", shuffle=False,# keep data in same order as label class_mode="categorical", batch_size=16) print("test_generator",test_generator) model=load_model(model_path)
probability=model.predict_generator(test_generator,steps=total_predict_data_number)