zoukankan      html  css  js  c++  java
  • Ubuntu16.04 + Digits + caffee

    reference: csdn

    必要依赖包安装

    sudo apt-get install build-essential
    sudo apt-get install --no-install-recommends libboost-all-dev
    sudo apt-get install libatlas-base-dev libgflags-dev libgoogle-glog-dev liblmdb-dev
    sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libhdf5-serial-dev protobuf-compiler
    sudo apt-get install libblas-dev liblapack-dev libatlas-base-dev gfortran python-numpy
    

    安装pip和easy-install

    cd
    wget --no-check-certificate https://bootstrap.pypa.io/ez_setup.py
    sudo python ez_setup.py --insecure
    wget https://bootstrap.pypa.io/get-pip.py
    sudo python get-pip.py
    
    

    安装caffe及python依赖

    sudo apt-get install git
    git clone https://github.com/BVLC/caffe.git
    sudo apt-get install python-pip
    cd python #在caffe根目录python文件夹下安装依赖项;
    sudo for req in $(cat "requirements.txt"); do pip install -i https://pypi.tuna.tsinghua.edu.cn/simple $req; done
    

    编译caffe

    cd caffe
    sudo cp Makefile.config.example Makefile.config
    sudo gedit Makefile.config
    

    在打开的Makefile.config文件中做如下修改;

    1).将USE_CUDNN := 1取消注释;

    2).INCLUDE_DIRS := $(PYTHON_INCLUDE)/usr/local/include空格后然后添加/usr/include/hdf5/serial /usr/local/cuda-8.0/include/(添加cuda的include路径);

    3).LIBRARY_DIRS:=$(PYTHON_LIB)/usr/local/lib /usr/lib 空格后添加 /usr/local/cuda-8.0/lib64/(添加cuda的lib路径);

    开始编译caffe

    make all –j16   (16线程,线程越多速度越快)
    make test –j16
    make runtest –j16
    make pytest –j16
    
    

    编译成功后测试python

    cd caffe/python
    python 
    import caffe 
    

    安装digits

    digits是caffe的一个可视化工具,可使我们对caffe的操作变得方便容易。

    sudo git clone https://github.com/NVIDIA/DIGITS.git digits
    
    
    cd digits
    sudo apt-get install graphviz gunicorn
    for req in $(cat requirements.txt); do sudopip install $req; done 
    
    cd digits
    ./digits-devserver
    

    在网页上输入http://localhost:5000即可打开界面。

  • 相关阅读:
    ReactNative 适合初学的第一个教程demo,找租房
    ReactNative 从环境和第一个demo说起,填坑教程
    WKWebView与JS交互,UIWebView+JavascriptCore和JS交互
    JS中匿名函数$(function(){ })和(function(){})()的区别
    对前端的一个H5项目的所思所想
    使用Swift打造动态库SDK和DemoAPP时所遇到的(Xcode7.3)
    Git 分支合并代码
    Flutter中fluro使用
    flutter_redux框架的使用
    解决React-native init 初始化时 info Installing required CocoaPods dependencies
  • 原文地址:https://www.cnblogs.com/pprp/p/9426712.html
Copyright © 2011-2022 走看看