Chapter 7 Use of Pycaffe under Windows draw_net.py

Source: Internet
Author: User
Tags install matplotlib

Chapter 6 completed in Windows, the compilation of Pycaffe, if there is a problem with the compilation, please refer to: http://www.cnblogs.com/xiaopanlyu/p/6158902.html

The following assumption of this article is that the Pycaffe has been compiled and used directly.

1. Environment configuration

In order to be consistent with the Python version used when compiling Pycaffe in Chapter 6, the Python version used here is python2.7.12-64bit.:https://www.python.org/downloads/ release/python-2712/

1) Install Pip

Enter the following command on the Windows cmd command line, which is not specifically described in the following command, and is executed at this command line.

Command: python-m pip install-u pip

2) Install Protobuf

Command: Pip install Protobuf

If the version is not high enough, there may still be a importerror error, you can use the upgrade

Command: Pip install protobuf--upgrade

3) Install Pydot

Command:pip install pydot

4) Install Graphviz

Command:pip install GraphViz

5) Install Scikit_image

Command: Pip install Scikit-image

如果安装出错,可以下载后本地安装,:http://www.lfd.uci.edu/~gohlke/pythonlibs

从这个网站下载scikit_image-0.12.3-cp27-cp27m-win_amd64.whl(对应python x64),此处建议也直接把6) 、7) 、8) 中药安装的包下载下来,直接本地安装。

下载之后进行本地安装,注意文件路径

命令:pip install D:\your path\scikit_image-0.12.3-cp27-cp27m-win_amd64.whl

6) Install SciPy

Command: Pip install D:\your PATH\SCIPY-0.18.0-CP27-CP27M-WIN_AMD64.WHL

7) Install NUMPY-1.11.1+MKL

Command: Pip install D:\your PATH\NUMPY-1.11.1+MKL-CP27-CP27M-WIN_AMD64.WHL

8) Install Matplotlib

Command: Pip install D:\your PATH\MATPLOTLIB-1.5.3?CP27?CP27M?WIN_AMD64.WHL

2. Draw Net

将network.prototxt复制到Release文件夹下,cmd到该路径下,根据以下使用提示绘制网络结构。

usage:draw_net.py [-h] [--rankdir rankdir] [--phase phase]

Input_net_proto_file Output_image_file

1) Draw LeNet-5

Command: Python draw_net.py--rankdir=bt lenet_train_test.prototxt lenet-5.bmp

2) Draw Cifar10_full

Command: Python draw_net.py--rankdir=bt cifar10_full_train_test.prototxt cifar10_full.bmp

3) Draw Caffenetconv

Command: Python draw_net.py--rankdir=bt bvlc_caffenet_full_conv.prototxt bvlc_caffenet.bmp

Reference

1. http://blog.csdn.net/LG1259156776/article/details/52563889

2. http://www.lfd.uci.edu/~gohlke/pythonlibs/

3. https://www.python.org/downloads/release/python-2712/

4. http://www.cnblogs.com/xiaopanlyu/p/6158902.html

Chapter 7 Use of Pycaffe under Windows draw_net.py

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.