深度学习-异常处理-You must install pydot and graphviz for `pydotprint` to work.

异常代码


Traceback (most recent call last):
  File "D:/AiLearning/tf-demo/chapter08/mnist_cnn.py", line 292, in 
    display_nn_structure(model, "./images/cnn-structure.png")
  File "D:/AiLearning/tf-demo/chapter08/mnist_cnn.py", line 106, in display_nn_structure
    keras.utils.plot_model(model, nn_structure_path, show_shapes=True)
  File "C:\ProgramData\Anaconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\utils\vis_utils.py", line 283, in plot_model
    dpi=dpi)
  File "C:\ProgramData\Anaconda3\envs\tf2\lib\site-packages\tensorflow_core\python\keras\utils\vis_utils.py", line 110, in model_to_dot
    raise ImportError('Failed to import pydot. You must install pydot'
ImportError: Failed to import pydot. You must install pydot and graphviz for `pydotprint` to work.

异常处理

一:下载并安装 graphviz
http://www.graphviz.org/download/#windows

二:
pip install graphviz
pip install pydot

你可能感兴趣的:(机器学习,神经网络,深度学习)