0

I know this question has been asked many times, but so far none of the proposed solutions helped for me.

I am using Keras for training an autoencoder. I want to save the model to a png-file by using the plot_model method from keras.utils. When doing such, I get the following errors:

Graphviz error

As one can see, I am using Anaconda3, I use a virtualenv called 'py37'. What's more, I installed Graphviz (C:\Program Files (x86)\Graphviz2.38) and installed graphviz, python-graphviz and pydot to my virtualenv 'py37' (not to the root of Anaconda). I did so via conda install x.

I tried many things, amongst others adding the C:\Program Files (x86)\Graphviz2.38\bin to my user path, as proposed via this Stackoverflow solution, which did not help (even after restarting my computer).

I have little experience with these kind of things, so maybe I'm missing something obvious here.

Rutger Mauritz
  • 153
  • 1
  • 12

1 Answers1

0

I had the same issue. I tried everything as identified in other posts (which I am not repeating here).

Finally, the problem got resolved when I added GRAPHVIZ_DOT enivironment variable pointing to dot.exe as explained in https://enterprise-architecture.org/downloads?id=208

Hope this helps

Also with new version of Keras, make sure you are referring to

from tensorflow.keras.utils import plot_model

and not

from keras.utils.vis_utils import plot_model
user007
  • 540
  • 5
  • 11