Problem:
- I want to use
plot_model
fromkeras.utils
to draw a beautiful AI model layers map; - The tool
plot_model
requires "pydot" and "graphviz"; - I installed "pydot" using Anaconda Prompt (
pip install pydot
), and "graphviz" using the installer EXE; - Instead of a beautiful graph, I'm getting
AttributeError: module 'pydot' has no attribute 'InvocationException'
.
Question: how to make the error go away and the code run correctly?
Edit:
The error AttributeError: module 'pydot' has no attribute 'InvocationException'
is caused by a FileNotFoundError: [WinError 2] "dot" not found in path.
error, that is caused by a FileNotFoundError: [WinError 2] O sistema não pode encontrar o arquivo especificado
error.
Best Answer
It is a pydot version incompatibility, as seen on GitHub.
Do
pip install pydot==2.0.0
and it will work, as said by syedalimohsinbukhari.