zoukankan      html  css  js  c++  java
  • ubuntu 绘制lenet网络结构图遇到的问题汇总

    Couldn't import dot_parser, loading of dot files will not be possible的问题

    1 .sudo pip uninstall pyparsing

    2. sudo pip install -Iv https://pypi.python.org/packages/source/p/pyparsing/pyparsing-1.5.7.tar.gz#md5=9be0fcdcc595199c646ab317c1d9a709

        writing dependency_links to pyparsing.egg-info/dependency_links.txt
        writing manifest file 'pyparsing.egg-info/SOURCES.txt'
        reading manifest file 'pyparsing.egg-info/SOURCES.txt'
        writing manifest file 'pyparsing.egg-info/SOURCES.txt'
        Copying pyparsing.egg-info to /usr/local/lib/python2.7/dist-packages/pyparsing-1.5.7-py2.7.egg-info
        running install_scripts
        writing list of installed files to '/tmp/pip-58Jx3A-record/install-record.txt'
    done
      Removing source in /tmp/pip-I3FlLc-build
    Successfully installed pyparsing-1.5.7
    Cleaning up...

    3. sudo pip install pydot

    The directory '/home/tina/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/home/tina/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Requirement already satisfied: pydot in /usr/lib/python2.7/dist-packages

    进入python文件夹:cd ./caffe/python

       使用draw_net.py绘制lenet网络结构图

          命令:python draw_net.py ../examples/mnist/lenet_train_test.prototxt lenet.png

          如果出现错误:ImportError: No module named pydot,则再次使用pip安装,pip install pydot

          再次运行:python draw_net.py ../examples/mnist/lenet_train_test.prototxt lenet.png

          如果出现错误了:pydot.InvocationException: GraphViz's executables not found,此时需要安装graphviz,命令为sudo apt-get install graphviz

          最后再运行一次,终于成功了。在python文件夹下得到lenet.png文件了。如下图:

         

  • 相关阅读:
    a链接获取方法
    调用百度地图API搜索地名和关键词
    页面定时跳转
    amazeui 上传文件
    数组删除多个元素的方法
    synology git 服务器问题处理
    公司和家里代码文件同步方案: (git和dropbox实现)
    前端项目, 每次运行都需要输入 sudo 的解决方法
    git revert 让提交不再害怕
    建立自己的键盘栈(shortcutkeyStack)
  • 原文地址:https://www.cnblogs.com/is-Tina/p/7694298.html
Copyright © 2011-2022 走看看