windows 下 keras.utils.plot_model報錯問題

1、下載graphviz.msi安裝包,添加Bin目錄到Path系統變量

下載地址:https://graphviz.gitlab.io/_pages/Download/Download_windows.html

2、如果出現'dict' object has no attribute 'name' 錯誤:

https://github.com/tensorflow/tensorflow/issues/38988

添加 model._layers = [layer for layer in model._layers if not isinstance(layer, dict)] 這一行

再執行keras.utils.plot_model(model, "my_first_model_with_shape_info.png", show_shapes=True)

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