问题描述
我正在使用keras.preprocessing.image.ImageDataGenerator
当我像这样喂它到model.fit
history = model.fit(
train_data_gen,epochs=EPOCHS,steps_per_epoch=steps_per_epoch,validation_data=val_data_gen,validation_freq=validation_freq,callbacks=[EarlyStopping(monitor='val_accuracy',patience=2)]
)
它可以正常工作,但是没有实际的验证数据,因此我的回调不起作用,也无法进行绘图,因为history.history['val_accuracy']
根本不存在,因此在此dict精度中我只有两项,损失
所以我的主要问题是如何使它像这样
history = model.fit(
x=train_data_gen,y=val_data_gen,)
但没有
ValueError: `y` argument is not supported when using python generator as input.
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)