Keras model pyspark error

╄→尐↘猪︶ㄣ 提交于 2019-12-11 15:40:55

问题


I have a keras model that has been pickled as described in the following blog.

http://zachmoshe.com/2017/04/03/pickling-keras-models.html

What's strange is that, when I ran the model on an html file when read from python as open(filename), it worked as expected. But when running it on a file when read from pyspark, I am getting the following error:

AttributeError("'Model' object has no attribute '_feed_input_names'",)

回答1:


You have to run make_keras_picklable() on each worker as well. Otherwise, the __setstate__ method of Model object on worker node is not updated and thus will not be deserialized as expected.



来源:https://stackoverflow.com/questions/46481920/keras-model-pyspark-error

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