Chapter 7 Windows下pycaffe的使用之draw_net.py

來源:互聯網
上載者:User

標籤:結構   article   升級   .net   pyc   upgrade   pip   otto   問題   

Chapter 6 中完成了在Windows下,對pycaffe的編譯,如果編譯存在問題,請參考:http://www.cnblogs.com/xiaopanlyu/p/6158902.html

本文接下來的內容假設已經編譯好了pycaffe,直接進行使用。

1. 環境配置

為了和chapter 6 中編譯pycaffe時使用的Python版本保持一致,這裡使用的Python版本是 Python2.7.12-64bit.:https://www.python.org/downloads/release/python-2712/

1) 安裝pip

在Windows cmd命令列中輸入以下命令,本文以下命令未特別說明,均在此命令列下執行。

命令:python -m pip install -U pip

2) 安裝protobuf

命令:pip install protobuf

如果 版本不夠高的話,可能還是會出現importerror的錯誤,可以使用升級

命令:pip install protobuf --upgrade

3) 安裝pydot

命令:pip install pydot

4) 安裝GraphViz

命令:pip install GraphViz

5) 安裝scikit_image

命令: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) 安裝scipy

命令:pip install D:\your path\scipy-0.18.0-cp27-cp27m-win_amd64.whl

7) 安裝numpy-1.11.1+mkl

命令:pip install D:\your path\numpy-1.11.1+mkl-cp27-cp27m-win_amd64.whl

8) 安裝matplotlib

命令: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

命令:python draw_net.py --rankdir=BT lenet_train_test.prototxt LeNet-5.bmp

2) draw CIFAR10_full

命令:python draw_net.py --rankdir=BT cifar10_full_train_test.prototxt cifar10_full.bmp

3) draw CaffeNetConv

命令: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 Windows下pycaffe的使用之draw_net.py

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

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.