BUG:Failed to import pydot. You must install pydot and graphviz for `pydotprint`

博主Ubuntu系統,利用plot_model輸出圖網絡時報錯:

Failed to import pydot. You must install pydot and graphviz for `pydotprint`

解決方法:

#安裝包
conda install pydotplus
conda install graphviz 
import pydotplus
from keras.utils import plot_model
keras.utils.vis_utils.pydot = pydotplus
plot_model(your_model_name, to_file='model.png', show_shapes=True)

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章