• 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文件了。如下图:

         

  • 相关阅读:
    testng失败截图,注解方式调用。
    HttpURLConnection和HttpClient
    JDK中的URLConnection参数详解
    如何做好Web接口测试
    selenium webdriver定位不到元素的五种原因及解决办法
    Selenium(Webdriver)自动化测试常问到的问题解答(转自:潜龙0318)
    常用网址记录
    python set
    python 浅拷贝和深拷贝
    python 元组
  • 原文地址:https://www.cnblogs.com/is-Tina/p/7694298.html
Copyright © 2020-2023  润新知