Keras fit_generator producing exception: output of generator should be a tuple(x, y, sample_weight) or (x, y). Found: [[[[ 0.86666673

╄→гoц情女王★ 提交于 2019-12-06 08:48:55

The real solution lies in this Keras issue apparently by @skottapa.

https://github.com/fchollet/keras/issues/4260

rodgzilla provided an updated ImageDataGenerator that adds a class_mode='input' that solves the problem.

The nice thing is that you can backport the modification to older Keras versions. A slightly modified image module can be downloaded here:

https://gist.github.com/gsdefender/293db0987a800cf1b103b7777966f8af

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!