2017-07-19 19:42:26 Scythe666 阅读数 20033
  • 深度学习30系统实训

    系列教程从深度学习核心模块神经网络开始讲起,将复杂的神经网络分模块攻克。由神经网络过度到深度学习,详解深度学习中核心网络卷积神经网络与递归神经网络。选择深度学习当下流行框架Tensorflow进行案例实战,选择经典的计算机视觉与自然语言处理经典案例以及绚丽的AI黑科技实战,从零开始带大家一步步掌握深度学习的原理以及实战技巧。课程具体内容包括:神经网络基础知识点、神经网络架构、tensorflow训练mnist数据集、卷积神经网络、CNN实战与验证码识别、自然语言处理word2vec、word2vec实战与对抗生成网络、LSTM情感分析与黑科技概述。

    14368 人正在学习 去看看 唐宇迪

1新智元编译1

来源:Linkedin

译者:胡祥杰

【新智元导读】本文是2016 台湾资料科学年会前导课程“一天搞懂深度学习”的全部讲义PPT(共268页),由台湾大学电机工程学助理教授李宏毅主讲。作者在文中分四个部分对神经网络的原理、目前存在形态以及未来的发展进行了介绍。深度学习的每一个核心概念在文中都有相关案例进行呈现,通俗易懂。一天的时间搞懂深度学习?其实并不是没有可能。

关注新智元,在公众号后台回复0822,可下载全部PPT(PDF版)

深度学习 ( Deep Learning ) 是机器学习 ( Machine Learning ) 中近年来备受重视的一支,深度学习根源于类神经网络 ( Artificial Neural Network ) 模型,但今日深度学习的技术和它的前身已截然不同,目前最好的语音识别和影像辨识系统都是以深度学习技术来完成,你可能在很多不同的场合听过各种用深度学习做出的惊人应用 ( 例如:最近红遍大街小巷的 AlphaGo ),听完以后觉得心痒痒的,想要赶快使用这项强大的技术,却不知要从何下手学习,那这门课就是你所需要的。

这门课程将由台大电机系李宏毅教授利用短短的一天议程简介深度学习。以下是课程大纲:

什么是深度学习

深度学习的技术表面上看起来五花八门,但其实就是三个步骤:设定好类神经网络架构、订出学习目标、开始学习,这堂课会简介如何使用深度学习的工具 Keras,它可以帮助你在十分钟内完成深度学习的程序。另外,有人说深度学习很厉害、有各种吹捧,也有人说深度学习只是个噱头,到底深度学习和其他的机器学习方法有什么不同呢?这堂课要剖析深度学习和其它机器学习方法相比潜在的优势。

深度学习的各种小技巧

虽然现在深度学习的工具满街都是,想要写一个深度学习的程序只是举手之劳,但要得到好的成果可不简单,训练过程中各种枝枝节节的小技巧才是成功的关键。本课程中将分享深度学习的实作技巧及实战经验。

有记忆力的深度学习模型

机器需要记忆力才能做更多事情,这段课程要讲解递归式类神经网络 ( Recurrent Neural Network ),告诉大家深度学习模型如何可以有记忆力。

深度学习应用与展望

深度学习可以拿来做甚么?怎么用深度学习做语音识别?怎么用深度学习做问答系统?接下来深度学习的研究者们在意的是什么样的问题呢?

本课程希望帮助大家不只能了解深度学习,也可以有效率地上手深度学习,用在手边的问题上。无论是从未尝试过深度学习的新手,还是已经有一点经验想更深入学习,都可以在这门课中有所收获。

下面是课程全部PPT,由于篇幅有限,新智元对第一部分进行了翻译:

深度学习吸引了很大的关注:

我相信,你之前肯定见到过很多激动人心的结果。图中是谷歌内部深度学习技术的使用趋势,可以看到从2015年第二季度开始,使用量呈直线上升。本讲义聚焦深度学习基础技术。

大纲:

报告第一部分:介绍深度学习

报告第二部分:关于训练深度神经网络的一些建议

报告第三部分:各种各样的神经网络

报告第四部分:下一股浪潮

报告1:深度学习介绍

深度学习有3步:神经网络架构--学习目标--学习。

这三个步骤都是以数据为基础的。

第3步:选择最佳的功能函数。

从原理上说,深度学习非常简单。

从函数的角度理解深度学习:第一步,是一个函数集;第二步,定义函数的拟合度;第三部,选择最佳函数。

人类大脑的构成

神经网络:神经元

激活函数的工作原理

不同的连接会导致不同的网络结构

完全连接的反向网络:S型网络

极深网络:从8层到19层,一直到152层。

全连接的反向网络:矩阵系统

输出层(选择)

问题:

下图中,总共有多少层?每一层有多少个神经元?

结构能自动决定吗?

第二步:学习目标,定义函数拟合度。

例子:识别“2”

训练数据:

准备训练数据:图像和相应的标签

学习目标

损失:一个好的函数应该让所有例子中的损失降到最小。

全局损失

第三步:学习!选择最佳函数。

如何选择最佳函数

梯度下降

梯度下降:综合多个参数考虑的时候,你发现什么问题了吗?

局部最小值:梯度下降从来不会保证可以获得全局最小值

反向传播

可以做什么?

第二部分:关于训练深度神经网络的一些小建议

第三部分:各种各样的神经网络

篇幅有限。200页以后PPT请在新智元公众号后台回复0822,下载浏览。

新智元Top10智能汽车创客大赛招募!

新智元于7月11日启动2016年【新智元100】人工智能创业公司评选,在人工智能概念诞生60周年之际,寻找中国最具竞争力的人工智能创业企业。

智能驾驶技术是汽车行业的重点发展方向之一,同时也是人工智能相关产业创新落地的重要赛道之一。为此新智元联合北京中汽四方共同举办“新智元Top10智能汽车创客大赛”,共同招募智能汽车相关优质创业公司,并联合组织人工智能技术专家、传统汽车行业技术专家、关注智能汽车领域的知名风投机构,共同评审并筛选出Top 10进入决赛,在2016年10月16日“国际智能网联汽车发展合作论坛”期间,进行路演、颁奖及展览活动。

如何参加【新智元Top10智能汽车创客大赛】评选

点击文章下方阅读原文,在线填写报名表。该报名表为参加评选必填资料。

如有更多介绍资料(例如BP等),可发送至xzy100@aiera.com.cn,邮件标题请注明公司名称。如有任何咨询问题,可联系微信号Kunlin1201。

评选活动时间表

创业企业报名期:即日起至2016年8月31日

专家评委评审期:2016年9月

入围企业公布期:2016年10月18日

微信号:AI_era100

2018-07-31 17:22:40 lz_peter 阅读数 854
  • 深度学习30系统实训

    系列教程从深度学习核心模块神经网络开始讲起,将复杂的神经网络分模块攻克。由神经网络过度到深度学习,详解深度学习中核心网络卷积神经网络与递归神经网络。选择深度学习当下流行框架Tensorflow进行案例实战,选择经典的计算机视觉与自然语言处理经典案例以及绚丽的AI黑科技实战,从零开始带大家一步步掌握深度学习的原理以及实战技巧。课程具体内容包括:神经网络基础知识点、神经网络架构、tensorflow训练mnist数据集、卷积神经网络、CNN实战与验证码识别、自然语言处理word2vec、word2vec实战与对抗生成网络、LSTM情感分析与黑科技概述。

    14368 人正在学习 去看看 唐宇迪

Lecture I : Introduction of Deep Learning

  • Introduction of Deep Learning
    • Step1 : define a set of function
    • Step2 : goodness of function
    • Step3 : pick the best function
  • Why Deep?
  • "Hello World" for Deep Learning

Lecture II : Tips for Training Deep Neural Network

  • Recipe of Deep Learning
    • Choosing proper loss
    • Mini-batch
    • New activation function
    • Adaptive Learning Rate
    • Momentum
    • Early Stopping
    • Weight Decay
    • Regularization
    • Dropout
    • Network Structure

Lecture III : Variants of Neural Network

  • Convolutional Neural Network(CNN)
  • Recurrent Neural Network(RNN)

Lecture IV : Next Wave

  • Supervised Learning
    • Ultra Deep Network
    • Attention Model
  • Reinforcement Learning
  • Unsuperivised Learning
    • Image:Realizing what the World Looks Like
    • Text:Understanding the Meaning of Words
    • Audio:Learning human language without supervision

 

2019-12-16 21:52:54 weixin_44781226 阅读数 5
  • 深度学习30系统实训

    系列教程从深度学习核心模块神经网络开始讲起,将复杂的神经网络分模块攻克。由神经网络过度到深度学习,详解深度学习中核心网络卷积神经网络与递归神经网络。选择深度学习当下流行框架Tensorflow进行案例实战,选择经典的计算机视觉与自然语言处理经典案例以及绚丽的AI黑科技实战,从零开始带大家一步步掌握深度学习的原理以及实战技巧。课程具体内容包括:神经网络基础知识点、神经网络架构、tensorflow训练mnist数据集、卷积神经网络、CNN实战与验证码识别、自然语言处理word2vec、word2vec实战与对抗生成网络、LSTM情感分析与黑科技概述。

    14368 人正在学习 去看看 唐宇迪

原题传送门
大佬讲的非常好:大佬讲LCT
看了一天的LCT,终于稍微弄懂了一些,这里有几个个人总结的tip,将来深入应该会继续加一些tip。

LCT就是一颗树,但它上面有很多很多的Splay树,LCT算是一片Splay的集合。

每一颗Splay树的键值都是它在原来树/图里面的深度(这个对理解LCT是非常重要的,是深度!是深度!是深度!)。

每一颗Splay树中的节点都必须保证:最多只有一个属于该Splay树的节点的儿子

因为LCT中有很多Splay树,所以每一颗Splay树内部用实链(例如x,y,当fa[x]=y,t[y][1/0]=x,时为实链;当fa[x]=y,t[y][1/0]!=x,时为虚链),每两颗Splay树之间连接用虚链。

Splay树中有个翻转标记,这个很重要,把它连着“键值是深度”一起想就好理解了。

还有选择一些pushdown和pushup的用法,有一些题是专门卡这些的,如果实在想不通为什么要这样更新,那就这样学模板吧(打不赢就加入,hhh)

#include<bits/stdc++.h>  // 这题初始时,没有LCT树,因为全是些节点,而且还是没有连起来的那种节点
#define lson t[x][0]
#define rson t[x][1]
using namespace std;
const int MX=3e5+9;
int fa[MX],t[MX][2],val[MX],ans[MX],st[MX],n,m;
bool r[MX];

int nroot(int x){   // 判断该x节点是否是它所属的Splay树里面的根节点
    return t[fa[x]][1]==x || t[fa[x]][0]==x ;
}

void pushup(int x){
    ans[x]=ans[lson]^ans[rson]^val[x];
}

void pushr(int x){
    swap(t[x][1],t[x][0]);
    r[x]^=1;    // 这里不直接赋值0是有道理的,可以注意一下makeroot函数
}

void pushdown(int x){    // 听巨佬说这样写可以砍掉很多的特殊情况,所以嫖一下,嘿嘿
    if( r[x] ){    // 这样写基本可以保证:当走到某一个节点x时,x的儿子可以更新,
        if( lson ) pushr(lson);   // 但儿子的儿子还没有更新
        if( rson ) pushr(rson);
        r[x]=0;
    }
}

int get(int x){    // Splay树里面的常规操作,判断x是它父树的左儿子还是右儿子
    return t[fa[x]][1]==x;    
}

void rotate(int x){
    int y=fa[x],z=fa[y],kx=get(x),ky=get(y);
    if( nroot(y) )   // 当y是该Splay树的根节点时,就不允许z的儿子只向x了,因为这里必须要用虚链
        t[z][ky]=x;    // 这里是和普通的Splay树区别的地方
    fa[x]=z;
    t[y][kx]=t[x][!kx],fa[t[x][!kx]]=y;  
    t[x][!kx]=y,fa[y]=x;
    pushup(y),pushup(x);
}

void splay(int x){
    int y=x,z=0;
    st[++z]=y;
    while( nroot(y) ){  // 我们是转到这一颗Splay树的树顶,所以判断条件是nroot(y)
        y=fa[y];    
        st[++z]=y;
    }
    while( z )             // 以x为最底下的节点,向上更新(跟着大佬学的),防止改变树结构时原来
        pushdown(st[z--]);     // 的节点还未更新这种情况
    while( nroot(x) ){
        y=fa[x],z=fa[y];
        if( nroot(y) ){   //判断y是不是顶点,再向上转
            if( (t[y][0]==x)^(t[z][0]==y) )
                rotate(x);
            else
                rotate(y);
        }
        rotate(x);
    }
    pushup(x);
}

void access(int x){
    for( int y=0 ; x ; x=fa[y] ){
        splay(x);
        rson=y;
        pushup(x);   // 这里不能忘记更新
        y=x;
    }
}

void makeroot(int x){
    access(x);
    splay(x);
    pushr(x);
}

int findroot(int x){   // 找到x节点所属LCT树的根,那么它深度必然最小,所以键值最小,也就是最右边
    access(x);
    splay(x);
    while( lson ){   // 注意是lson作为判断
        pushdown(x);   // 还要记得向下更新
        x=lson;
    }
    splay(x);
    return x;
}

void split(int x,int y){   // 把x和y放在同一颗Splay树里面,且y是根,x是最右边的那个
    makeroot(x);
    access(y);
    splay(y);
}

void link(int x,int y){
    makeroot(x);
    if( findroot(y)!=x )    // 只有它们不在同一颗LCT中才能连,不然就形成了环
        fa[x]=y;   // 没有说过子树一颗二叉树,它可以有很多子节点
}

void cut(int x,int y){
    makeroot(x);
    if( findroot(y)==x && fa[y]==x && !t[y][0] ){     // 这个!t[y][0]千万不可以漏掉,因为
        fa[y]=t[x][1]=0;   // t[y][0]=0,可以保证比x(键值,也就是深度)大的只有y,否则就表明x和y
        pushup(x);   // 之间还有其它的节点,还有记得更新
    }
}

int main()
{
    //freopen("input.txt","r",stdin);
    scanf("%d %d",&n,&m);
    for( int i=1 ; i<=n ; i++ )
        scanf("%d",&val[i]);
    while( m-- ){
        int order,x,y;
        scanf("%d %d %d",&order,&x,&y);
        if( order==0 ){
            split(x,y);
            printf("%d\n",ans[y]);
        }
        else if( order==1 ) link(x,y);
        else if( order==2 ) cut(x,y);
        else if( order==3 ){splay(x);val[x]=y;}   // 更新某个节点的值时,一定要放在该Splay树的
    }							// 根节点上再改变
    return 0;
}

2018-02-07 14:52:38 xuluohongshang 阅读数 3288
  • 深度学习30系统实训

    系列教程从深度学习核心模块神经网络开始讲起,将复杂的神经网络分模块攻克。由神经网络过度到深度学习,详解深度学习中核心网络卷积神经网络与递归神经网络。选择深度学习当下流行框架Tensorflow进行案例实战,选择经典的计算机视觉与自然语言处理经典案例以及绚丽的AI黑科技实战,从零开始带大家一步步掌握深度学习的原理以及实战技巧。课程具体内容包括:神经网络基础知识点、神经网络架构、tensorflow训练mnist数据集、卷积神经网络、CNN实战与验证码识别、自然语言处理word2vec、word2vec实战与对抗生成网络、LSTM情感分析与黑科技概述。

    14368 人正在学习 去看看 唐宇迪

相信做目标检测的同学都知道facebook已经开源了一个集成很多先进目标检测算法的库,但是官网教程主要针对采用ubuntu系统python来编译安装caffe2,由于采用深度学习服务器没有sudo权限,我花费了一天半安装GPU版的caffe2,最多的错误就是protobuff错误!!很难搞,做了很多测试才弄懂,下面做一个简单的总结,希望能帮助后来的初学者:
编译Anaconda下的Caffe2常出现的protobuff错误如下:

../lib/libcaffe2.so: undefined reference to `google::protobuf::internal::OnShutdownDestroyString(std::string const*)'
../lib/libcaffe2.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../lib/libcaffe2.so: undefined reference to `google::protobuf::Message::ShortDebugString() const'
../lib/libcaffe2.so: undefined reference to `google::protobuf::internal::WireFormatLite::WriteString(int, std::string const&, google::protobuf::io::CodedOutputStream*)'
../lib/libcaffe2.so: undefined reference to `google::protobuf::internal::ParseNamedEnum(google::protobuf::EnumDescriptor const*, std::string const&, int*)'
../lib/libcaffe2.so: undefined reference to `google::protobuf::internal::WireFormatLite::ReadBytes(google::protobuf::io::CodedInputStream*, std::string*)'
../lib/libcaffe2.so: undefined reference to `google::protobuf::Message::InitializationErrorString() const'
collect2: error: ld returned 1 exit status
make[2]: *** [bin/blob_test] Error 1
make[1]: *** [caffe2/CMakeFiles/blob_test.dir/all] Error 2
Linking CXX shared module python/caffe2_pybind11_state.so
[ 92%] Built target caffe2_pybind11_state
make: *** [all] Error 2

下面,是我探索出的安装方法(仅供参考!)


Anaconda2+自建python2.7的虚拟环境:py27+Caffe2GPU版

GPU的cuda配置不再本教程范围介绍之内!请自行配置

下载anconda到用户的home路径下就不介绍了,以我的/home/slb/anaconda2为例介绍:
1.确定anconda的bin路径在普通用户的.bashrc中,如:

export PATH="/home/slb/anaconda2/bin:$PATH"

路径里不要添加如下路径,以免系统的Protobuf和conda环境的Protobuf冲突!:

#export PYTHONPATH=/usr/local:$PYTHONPATH
#export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

2.创建名为py27的conda虚拟环境,以避免与Tensorflow和老版Caffe的干扰
如下:

conda create -n py27 python=2.7

也可以自己起一个名字如叫:py27-caffe2

3.让管理员执行一下如下命令(注,这步貌似不是必须的)

# for Ubuntu 14.04
sudo apt-get install -y --no-install-recommends libgflags2
# for Ubuntu 16.04
sudo apt-get install -y --no-install-recommends libgflags-dev
sudo apt-get install -y --no-install-recommends \
      libgoogle-glog-dev \
      libgtest-dev \
      libiomp-dev \
      libleveldb-dev \
      liblmdb-dev \
      libopencv-dev \
      libopenmpi-dev \
      libsnappy-dev \
      libprotobuf-dev \
      openmpi-bin \
      openmpi-doc \
      protobuf-compiler \
      python-dev \
      python-pip     

3.安装caffe2到Caffe2_ROOT,如我的Caffe2安装在/home/slb/softwares/目录下,具体步骤是:

cd /home/slb/softwares/
git clone --recursive https://github.com/caffe2/caffe2.git && cd caffe2

激活py27的python环境,进行caffe2的编译并安装到虚拟环境的库中
source activate py27
安装依赖:

conda install -y \
    future \
    gflags \
    glog \
    lmdb \
    mkl \
    mkl-include \
    numpy \
    opencv \
    protobuf \
    snappy \
    six

再运行一遍下面指令:

conda install -y --channel https://conda.anaconda.org/conda-forge  gflags glog  numpy protobuf(这步很关键,不然会protobuf老报错!在conda安装包的时候最好指定从官网正式发布包源安装!!因为直接用conda install安装的包可能不稳定)

尤其是编译时会用到conda安装的opencv和protobuff
查看可得到的protobuf

protoc --version

显示为libprotoc 3.5.1,而不是usr/local/.下的 libprotoc即表明该虚拟环境下不是系统路径下的protobuf,但是即便有干扰我们也不怕,看下面的步骤:

cd到Caffe2目录下:

mkdir build && cd build

然后cmake到上一层目录下,即按照下面的“尝试1”进行操作(按照尝试2操作会安装失败)

尝试1:成功测试!
:成功安装的话python的site-packages目录下应该有caffe2和caffe文件夹!
cmake指令为:

~/softwares/caffe2/build$ cmake .. -DCMAKE_PREFIX_PATH=$HOME/anaconda2/envs/py27  -DCMAKE_INSTALL_PREFIX=$HOME/anaconda2/envs/py27
注:当时把py27写错了,以至于安装到其他环境了,注意粘贴时注意!

其中:

-DCMAKE_PREFIX_PATH=$HOME/anaconda2/envs/py27保证编译搜索库时先搜索虚拟环境中可用的库
-DCMAKE_INSTALL_PREFIX=$HOME/anaconda2/envs/py27保证最终的caffe2安装到你的虚拟环境的python包文件夹下

cmake输出信息:

-- GCC 4.8.4: Adding gcc and gcc_s libs to link line
-- Include NCCL operators
-- Including image processing operators
-- Excluding video processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- Include Observer library
-- Automatically generating missing __init__.py files.
-- 
-- ******** Summary ********
-- General:
--   CMake version         : 2.8.12.2
--   CMake command         : /usr/bin/cmake
--   Git version           : v0.8.1-1061-g5d7ef79
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 4.8.4
--   Protobuf compiler     : /home/slb/anaconda2/envs/py27/bin/protoc
--   Protobuf include path : /home/slb/anaconda2/envs/py27/include
--   Protobuf libraries    : optimized;/home/slb/anaconda2/envs/py27/lib/libprotobuf.so;debug;/home/slb/anaconda2/envs/py27/lib/libprotobuf.so;-lpthread
--   CXX flags             :  -Wno-deprecated -std=c++11 -O2 -fPIC -Wno-narrowing -Wno-invalid-partial-specialization
--   Build type            : Release
--   Compile definitions   : 
-- 
--   BUILD_BINARY          : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : ON
--     Python version      : 2.7.11
--     Python library      : /home/slb/anaconda2/envs/py27/lib/libpython2.7.so
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : ON
--   USE_ATEN              : OFF
--   USE_ASAN              : OFF
--   USE_CUDA              : ON
--     CUDA version        : 8.0
--     CuDNN version       : 6.0.21
--     CUDA root directory : /usr/local/cuda
--     CUDA library        : /usr/lib/x86_64-linux-gnu/libcuda.so
--     CUDA NVRTC library  : /usr/local/cuda/lib64/libnvrtc.so
--     CUDA runtime library: /usr/local/cuda/lib64/libcudart.so
--     CUDA include path   : /usr/local/cuda/include
--     NVCC executable     : /usr/local/cuda/bin/nvcc
--     CUDA host compiler  : /usr/bin/cc
--   USE_EIGEN_FOR_BLAS    : 1
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : ON
--   USE_GLOG              : ON
--   USE_GLOO              : ON
--   USE_LEVELDB           : ON
--     LevelDB version     : 1.15
--     Snappy version      : ..
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : ON
--     LMDB version        : 0.9.21
--   USE_METAL             : OFF
--   USE_MKL               : 
--   USE_MOBILE_OPENGL     : OFF
--   USE_MPI               : ON
--   USE_NCCL              : ON
--   USE_NERVANA_GPU       : OFF
--   USE_NNPACK            : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCV            : ON
--     OpenCV version      : 3.3.0
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_THREADS           : ON
--   USE_ZMQ               : OFF

尝试2:失败!!,虽成功编译但没有成功安装到python路径中,原因:cmake时输出信息显示:BUILD_PYTHON : OFF,在次编译查找到是因为CMAKE后面指令中的python路径指定造成的,不应该有相关的指定

cmake .. -DCMAKE_PREFIX_PATH=$HOME/anaconda2/envs/py27  -DCMAKE_INSTALL_PREFIX=$HOME/anaconda2/envs/py27 -DPYTHON_LIBRARY=$(python2 -c "from distutils import sysconfig; print(sysconfig.get_python_lib())") -DPYTHON_INCLUDE_DIR=$(python2 -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")

其中:

-DCMAKE_PREFIX_PATH=$HOME/anaconda2/envs/py27保证编译搜索库时先搜索虚拟环境中可用的库
-DCMAKE_INSTALL_PREFIX=$HOME/anaconda2/envs/py27保证最终的caffe2安装到你的虚拟环境的python包文件夹下
-DPYTHON_LIBRARY=$(python2 -c "from distutils import sysconfig; print(sysconfig.get_python_lib())") -DPYTHON_INCLUDE_DIR=$(python2 -c "from distutils import sysconfig; print(sysconfig.get_python_inc())")再次保证编译时能先去激活环境下的python中找可用的libprotoc(例如当系统的libprotoc低版本时,如2.5版本的就会冲突和python中的protoc库,从而导致无法顺利安装)

cmake配置后的输出信息如下:仅供参考

-- GCC 4.8.4: Adding gcc and gcc_s libs to link line
-- Include NCCL operators
-- Including image processing operators
-- Excluding video processing operators due to no opencv
-- Excluding mkl operators as we are not using mkl
-- Include Observer library
-- 
-- ******** Summary ********
-- General:
--   CMake version         : 2.8.12.2
--   CMake command         : /usr/bin/cmake
--   Git version           : v0.8.1-1061-g5d7ef79
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 4.8.4
--   Protobuf compiler     : /home/slb/anaconda2/envs/caffe2-py27/bin/protoc
--   Protobuf include path : /home/slb/anaconda2/envs/caffe2-py27/include
--   Protobuf libraries    : optimized;/home/slb/anaconda2/envs/caffe2-py27/lib/libprotobuf.so;debug;/home/slb/anaconda2/envs/caffe2-py27/lib/libprotobuf.so;-lpthread
--   CXX flags             :  -Wno-deprecated -std=c++11 -O2 -fPIC -Wno-narrowing -Wno-invalid-partial-specialization
--   Build type            : Release
--   Compile definitions   : 
-- 
--   BUILD_BINARY          : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : OFF
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : ON
--   USE_ATEN              : OFF
--   USE_ASAN              : OFF
--   USE_CUDA              : ON
--     CUDA version        : 8.0
--     CuDNN version       : 6.0.21
--     CUDA root directory : /usr/local/cuda
--     CUDA library        : /usr/lib/x86_64-linux-gnu/libcuda.so
--     CUDA NVRTC library  : /usr/local/cuda/lib64/libnvrtc.so
--     CUDA runtime library: /usr/local/cuda/lib64/libcudart.so
--     CUDA include path   : /usr/local/cuda/include
--     NVCC executable     : /usr/local/cuda/bin/nvcc
--     CUDA host compiler  : /usr/bin/cc
--   USE_EIGEN_FOR_BLAS    : 1
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : ON
--   USE_GLOG              : ON
--   USE_GLOO              : ON
--   USE_LEVELDB           : ON
--     LevelDB version     : 1.15
--     Snappy version      : ..
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : ON
--     LMDB version        : 0.9.21
--   USE_METAL             : OFF
--   USE_MKL               : 
--   USE_MOBILE_OPENGL     : OFF
--   USE_MPI               : ON
--   USE_NCCL              : ON
--   USE_NERVANA_GPU       : OFF
--   USE_NNPACK            : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCV            : ON
--     OpenCV version      : 2.4.13.4
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_THREADS           : ON
--   USE_ZMQ               : OFF
-- Configuring done
-- Generating done
-- Build files have been written to: /home/slb/softwares/caffe2/build

最后一步:

make install 

编译并把编译好的库安装到你的虚拟环境的python库中,安装成功, 最后会输入如下信息:

-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/ios/mpscnn/mpscnn_context.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/ios/mpscnn/mpscnn.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/ios/ios_caffe_defines.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/include
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/include/libvulkan-stub.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/include/vulkan
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/include/vulkan/vk_platform.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/include/vulkan/vulkan.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/libvulkan-stub/src
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/snpe
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/mobile/contrib/snpe/snpe_ffi.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/adam_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/adagrad_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/rmsprop_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/ftrl_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/iter_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/learning_rate_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/fp32_momentum_sgd_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/fp16_momentum_sgd_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/learning_rate_functors.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/yellowfin_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/sgd/momentum_sgd_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/transforms
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/transforms/pattern_net_transform.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/transforms/common_subexpression_elimination.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/transforms/single_op_transform.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/transforms/conv_to_nnpack_transform.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/cuda_rtc
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/cuda_rtc/common_rtc.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/shm_mutex
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/shm_mutex/shm_mutex.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/aten
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/aten/docs
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/aten/aten_op_template.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/warpctc
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/warpctc/ctc_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/prof
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/prof/htrace_conf.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/prof/prof_dag_stats_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/prof/prof_dag_net.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/error_report.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/tree_views.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/compiler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/examples
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/tree.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/lexer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/script/parser.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/docker-ubuntu-14.04
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/torch
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/torch/torch_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/tensorboard
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nccl
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nccl/cuda_nccl_gpu.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nervana
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nervana/nervana_c_api.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nervana/nervana.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/nnpack
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/common.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/allgather_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/allreduce_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/common_world_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/store_handler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/context.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/barrier_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/contrib/gloo/broadcast_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/mkl
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/operator_test
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/rnn
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/layers
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/examples
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/docs
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/helpers
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/modeling
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/pybind_state_dlpack.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/pybind_state.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/test
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/predictor
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/models
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/models/seq2seq
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/tutorials
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/tutorials/images
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/tutorials/experimental
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/tutorials/py_gen
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/mint
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/mint/templates
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/mint/static
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/mint/static/css
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/python/dlpack.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/fused_rowwise_8bit_conversion_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/softmax_shared.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_network_blob_fetcher_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/cross_entropy_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/slice_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/reshape_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/reducer_functors.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/expand_squeeze_dims_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/elementwise_logical_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/roi_align_gradient_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/order_switch_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/zero_gradient_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/flexible_top_k.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/prepend_dim_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/string_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/boolean_unmask_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_transpose_op_mobile.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lengths_reducer_rowwise_8bit_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/loss_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/normalize_l1_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_transpose_unpool_op_base.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/sparse_normalize_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/create_scope_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/rmac_regions_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_op_cache_cudnn.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/concat_split_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/pad_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/batch_sparse_to_dense_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/quant_decode_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/percentile_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/square_root_divide_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/map_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/local_response_normalization_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/remove_data_blocks_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conditional_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/gru_unit_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/box_with_nms_limit_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/partition_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/locally_connected_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/sequence_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/ngram_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/operator_fallback_gpu.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/prefetch_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/text_file_reader_utils.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/reduction_front_back_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/apmeter_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/math_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/generate_proposals_op_util_boxes.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/top_k.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_op_shared.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/dropout_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lstm_unit_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/half_float_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/utility_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/accuracy_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/instance_norm_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/locally_connected_op_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/one_hot_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/key_split_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/reverse_packed_segs_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/bbox_transform_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/max_pool_with_index.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/negate_gradient_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/elementwise_op_test.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/flatten_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/piecewise_linear_transform_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/sparse_to_dense_mask_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/generate_proposals_op_util_nms.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_pool_op_base.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/pack_segments.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/stop_gradient.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/roi_pool_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/spatial_softmax_with_loss_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/gather_ranges_to_dense_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/prelu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/swish_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/pack_rnn_sequence_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/given_tensor_fill_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/relu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/mod_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/filler_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/weighted_sample_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/assert_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/spatial_batch_norm_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_transpose_op_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/summarize_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/distance_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/elementwise_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_network_executor.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/deform_conv_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/rowmul_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/find_duplicate_elements_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/elu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/normalize_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/margin_ranking_criterion_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_op_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/do_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/channel_stats_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/accumulate_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/segment_reduction_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/tile_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_network_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/counter_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lengths_top_k_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/scale_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/batch_matmul_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_op_cudnn.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/listwise_l2r_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/layer_norm_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/leaky_relu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/multi_class_accuracy_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/find_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/tt_linear_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/while_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/dataset_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/h_softmax_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/clip_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_network_executor_gpu.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/cast_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/sinusoid_position_encoding_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_transpose_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/recurrent_network_executor_incl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/resize_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lengths_reducer_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/logit_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lpnorm_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/shape_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/onnx_while_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/load_save_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/deform_conv_op_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/replace_nan_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/space_batch_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/if_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/transpose_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/matmul_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/roi_align_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/boolean_mask_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/channel_backprop_stats_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/softmax_with_loss_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/selu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/batch_box_cox_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/pool_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/feed_blob_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lengths_tile_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/channel_shuffle_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/lengths_reducer_fused_8bit_rowwise_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/im2col_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/minmax_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/softplus_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/perplexity_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/reduction_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/generate_proposals_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/merge_id_lists_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/elementwise_linear_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/softmax_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/no_default_engine_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/tensor_protos_db_input.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/cosine_embedding_criterion_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/conv_transpose_op_mobile_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/batch_gather_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/fully_connected_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/sparse_to_dense_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/free_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/index_hash_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/rank_loss_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/operators/glu_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/python
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/fully_connected_op_sparse.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/sparse_matrix_reshape_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/tt_pad_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/sparse_funhash_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/funhash_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/fully_connected_op_decomposition.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/fully_connected_op_prune.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/experiments/operators/tt_contraction_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/file_store_handler_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/redis_store_handler_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/redis_store_handler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/store_handler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/file_store_handler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/distributed/store_ops.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/test
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/test/assets
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/observers
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/observers/time_observer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/observers/operator_attaching_net_observer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/observers/runcnt_observer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/db
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/db/create_db_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/binaries
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/zstd
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/zstd/quant_decomp_zstd_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/observers
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/observers/net_observer_reporter_print.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/observers/perf_observer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/observers/observer_config.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/observers/net_observer_reporter.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/binaries
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/binaries/caffe2_benchmark
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/share/contrib/nnpack
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/video
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/video/video_io.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/video/optical_flow.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/video/video_input_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/video/video_decoder.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/image
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/image/image_input_op.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/image/transform_gpu.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/mixed_utils.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/conversions.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/zmq_helper.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/math.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/cpu_neon.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/murmur_hash3.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/smart_tensor_printer.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool/ThreadPool.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool/pthreadpool_impl.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool/WorkersPool.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool/ThreadPoolCommon.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/threadpool/pthreadpool.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/thread_pool.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/simple_queue.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/signal_handler.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/cblas.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/string_utils.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/cpuid.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/proto_utils.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/eigen_utils.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/cast.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/fixed_divisor.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/utils/math-detail.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels/common.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels/typed_axpy.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels/cvtsh_ss_bugfix.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels/embedding_lookup.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/perfkernels/fused_8bit_rowwise_embedding_lookup.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/core/macros.h
-- Installing: /home/slb/anaconda2/envs/py27/lib/libcaffe2.so
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/lib/libcaffe2.so"
-- Installing: /home/slb/anaconda2/envs/py27/lib/libcaffe2_gpu.so
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/lib/libcaffe2_gpu.so"
-- Installing: /home/slb/anaconda2/envs/py27/test/init_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/init_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/transform_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/transform_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/blob_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/blob_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/timer_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/timer_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/graph_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/graph_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/registry_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/registry_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/stats_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/stats_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/net_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/net_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/logging_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/logging_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/operator_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/operator_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/operator_schema_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/operator_schema_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/workspace_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/workspace_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/module_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/module_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/context_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/context_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/event_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/event_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/common_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/common_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/parallel_net_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/parallel_net_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/predictor_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/predictor_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/typeid_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/typeid_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/observer_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/observer_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/mpi_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/mpi_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/time_observer_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/time_observer_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/text_file_reader_utils_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/text_file_reader_utils_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/generate_proposals_op_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/generate_proposals_op_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/boolean_unmask_ops_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/boolean_unmask_ops_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/batch_matmul_op_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/batch_matmul_op_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/generate_proposals_op_util_boxes_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/generate_proposals_op_util_boxes_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/utility_ops_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/utility_ops_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/string_ops_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/string_ops_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/elementwise_op_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/elementwise_op_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/conv_transpose_op_mobile_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/conv_transpose_op_mobile_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/generate_proposals_op_util_nms_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/generate_proposals_op_util_nms_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/conv_op_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/conv_op_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/pattern_net_transform_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/pattern_net_transform_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/common_subexpression_elimination_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/common_subexpression_elimination_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/conv_to_nnpack_transform_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/conv_to_nnpack_transform_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/fixed_divisor_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/fixed_divisor_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/smart_tensor_printer_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/smart_tensor_printer_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/math_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/math_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/cpuid_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/cpuid_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/proto_utils_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/proto_utils_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/fatal_signal_asan_no_sig_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/fatal_signal_asan_no_sig_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/simple_queue_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/simple_queue_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/context_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/context_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/operator_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/operator_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/net_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/net_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/event_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/event_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/blob_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/blob_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/mpi_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/mpi_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/conv_op_cache_cudnn_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/conv_op_cache_cudnn_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/batch_matmul_op_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/batch_matmul_op_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/reshape_op_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/reshape_op_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/elementwise_op_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/elementwise_op_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/operator_fallback_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/operator_fallback_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/roi_align_op_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/roi_align_op_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/utility_ops_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/utility_ops_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/test/math_gpu_test
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/test/math_gpu_test"
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/predictor_consts.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/caffe2.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/hsm.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/metanet.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/caffe2_legacy.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/include/caffe2/proto/prof_dag.pb.h
-- Installing: /home/slb/anaconda2/envs/py27/bin/convert_caffe_image_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/convert_caffe_image_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/convert_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/convert_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/db_throughput
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/db_throughput"
-- Installing: /home/slb/anaconda2/envs/py27/bin/make_cifar_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/make_cifar_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/make_mnist_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/make_mnist_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/predictor_verifier
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/predictor_verifier"
-- Installing: /home/slb/anaconda2/envs/py27/bin/print_registered_core_operators
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/print_registered_core_operators"
-- Installing: /home/slb/anaconda2/envs/py27/bin/run_plan
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/run_plan"
-- Installing: /home/slb/anaconda2/envs/py27/bin/speed_benchmark
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/speed_benchmark"
-- Installing: /home/slb/anaconda2/envs/py27/bin/split_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/split_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/inspect_gpus
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/inspect_gpus"
-- Installing: /home/slb/anaconda2/envs/py27/bin/print_core_object_sizes
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/print_core_object_sizes"
-- Installing: /home/slb/anaconda2/envs/py27/bin/core_overhead_benchmark
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/core_overhead_benchmark"
-- Installing: /home/slb/anaconda2/envs/py27/bin/run_plan_mpi
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/run_plan_mpi"
-- Installing: /home/slb/anaconda2/envs/py27/bin/convert_encoded_to_raw_leveldb
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/convert_encoded_to_raw_leveldb"
-- Installing: /home/slb/anaconda2/envs/py27/bin/make_image_db
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/make_image_db"
-- Installing: /home/slb/anaconda2/envs/py27/bin/tutorial_blob
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/bin/tutorial_blob"
-- Installing: /home/slb/anaconda2/envs/py27/lib/libcaffe2_detectron_ops_gpu.so
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/lib/libcaffe2_detectron_ops_gpu.so"
-- Installing: /home/slb/anaconda2/envs/py27/lib/libcaffe2_module_test_dynamic.so
-- Removed runtime path from "/home/slb/anaconda2/envs/py27/lib/libcaffe2_module_test_dynamic.so"

以上caffe文件主要安装在虚拟环境py27目录下的bin,lib,include和test目录中!重点内容
注:若安装成功,caffe的build目录的bin目录下必须有东西!
以上如果安装成功,配置好.bashrc后,你就可以在虚拟环境py27下继续Detectron的安装了(安装指导

若以上无法顺利安装,可参考如下链接的Troubleshooting部分说明,尤其是针对Protobuf Errors的说明及解决方法:

https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile#custom-anaconda-install
https://caffe2.ai/docs/getting-started.html?platform=mac&configuration=compile#custom-anaconda-install
https://github.com/facebookresearch/Detectron/blob/master/INSTALL.md

其他可参考的解决方法:
1.conda uninstall libtiff worked for me或者sudo apt-get install libtiff4-dev

当出现opencv。。。。TIFF@错误时,可能系统中既有ananconda的opencv又有系统usr/local中的opencv或者是protobuff系统版本和conda环境中的混淆引起的!

2.Caffe2 uses protobuf as its serialization format and requires version 3.2.0 or newer. If your protobuf version is older, you can build protobuf from Caffe2 protobuf submodule and use that version instead.

To build Caffe2 protobuf submodule:

手动编译支持caffe2的Protobuf:
# CAFFE2=/path/to/caffe2
cd $CAFFE2/third_party/protobuf/cmake
mkdir -p build && cd build
#编译并安装在自己的home路径下,用于caffe2编译,如下:
cmake .. \
  -DCMAKE_INSTALL_PREFIX=$HOME/c2_tp_protobuf \
  -Dprotobuf_BUILD_TESTS=OFF \
  -DCMAKE_CXX_FLAGS="-fPIC"
make install

3.其他错误,如果大家google解决不了,可以提出来,我有时间会跟大家一起交流,共同学习!谢谢

2017-03-05 19:29:53 chenqijing2 阅读数 6553
  • 深度学习30系统实训

    系列教程从深度学习核心模块神经网络开始讲起,将复杂的神经网络分模块攻克。由神经网络过度到深度学习,详解深度学习中核心网络卷积神经网络与递归神经网络。选择深度学习当下流行框架Tensorflow进行案例实战,选择经典的计算机视觉与自然语言处理经典案例以及绚丽的AI黑科技实战,从零开始带大家一步步掌握深度学习的原理以及实战技巧。课程具体内容包括:神经网络基础知识点、神经网络架构、tensorflow训练mnist数据集、卷积神经网络、CNN实战与验证码识别、自然语言处理word2vec、word2vec实战与对抗生成网络、LSTM情感分析与黑科技概述。

    14368 人正在学习 去看看 唐宇迪

Github地址:https://github.com/deepzz0/dotfiles/blob/master/.vimrc

多的不多说,耗时整整一天。处女座就是这么不能忍。

超级详细,超级清晰。弄懂vim配置的好范例。你要的都在这里了。希望对你们有所帮助。

" Vundle {{{
  set nocompatible              " be iMproved, required
  filetype off                  " required

  " set the runtime path to include Vundle and initialize
  set rtp+=~/.vim/bundle/Vundle.vim
  call vundle#begin()
  " alternatively, pass a path where Vundle should install plugin
  " call vundle#begin('~/some/path/here')

  " let Vundle manage Vundle, required
  Plugin 'VundleVim/Vundle.vim'
  Plugin 'scrooloose/nerdtree'
  Plugin 'Xuyuanp/nerdtree-git-plugin'
  Plugin 'jistr/vim-nerdtree-tabs'

  Plugin 'Valloric/YouCompleteMe'
  Plugin 'SirVer/ultisnips'
  Plugin 'honza/vim-snippets'
  Plugin 'davidhalter/jedi-vim'
  Plugin 'Raimondi/delimitMate'

  Plugin 'ctrlpvim/ctrlp.vim'
  Plugin 'dyng/ctrlsf.vim'
  Plugin 'majutsushi/tagbar'
  Plugin 'rking/ag.vim'
  Plugin 'Lokaltog/vim-easymotion'
  Plugin 'vim-scripts/matchit.zip'

  Plugin 'tomtom/tcomment_vim'
  Plugin 'tpope/vim-surround'
  Plugin 'terryma/vim-multiple-cursors'

  Plugin 'scrooloose/syntastic'
  Plugin 'klen/python-mode'
  Plugin 'xolox/vim-lua-ftplugin'
  Plugin 'xolox/vim-misc'
  Plugin 'fatih/vim-go'
  Plugin 'posva/vim-vue'  

  Plugin 'tpope/vim-fugitive'
  Plugin 'gregsexton/gitv'
  Plugin 'airblade/vim-gitgutter'
  Plugin 'bling/vim-airline'
  Plugin 'noahfrederick/vim-hemisu'
  Plugin 'raymond-w-ko/vim-lua-indent'
  Plugin 'tomasr/molokai'
  Plugin 'zaki/zazen'


  " All of your Plugins must be added before the following line
  call vundle#end()            " required
  filetype plugin indent on    " required
  " To ignore plugin indent changes, instead use:
  "filetype plugin on
  "
  " Brief help
  " :PluginList       - lists configured plugins
  " :PluginInstall    - installs plugins; append `!` to update or just :PluginUpdate
  " :PluginSearch foo - searches for foo; append `!` to refresh local cache
  " :PluginClean      - confirms removal of unused plugins; append `!` to auto-approve removal
  "
  " see :h vundle for more details or wiki for FAQ
  " Put your non-Plugin stuff after this line
" }}}


" Vim {{{
  syntax on
  set shell=bash
  let mapleader = ','

  set shortmess=atI"              " Close welcome page
  set fillchars=vert:\ 

  set history=1000                " Store lots of :cmdline history
  set noswapfile                  " Don't use swapfile
  set nobackup                    " Don't create annoying backup files
  set noerrorbells                " No beeps
  set cursorline                  " Highlight the current line
  " set cursorcolumn                " Highlight the current column
  " set mouse-=a                    " not enable mouse
  set clipboard+=unnamed           " Shared clipboard
  set backspace=indent,eol,start  " Allow backspacing over everything in insert mode
  set linespace=0                 " How to change the space between lines in vim?
  set updatetime=100
  set switchbuf=usetab,usetab     " Open new buffers always in new tabs
  set wildignore+=*/.git/*,       " Linux/MacOSX
      \*/.hg/*,*/.svn/*,
      \*/cscope*,*/*.csv/,
      \*/*.log,*tags*,*/bin/*        

  set showcmd                     " Show me what I'm typing
  set showmode                    " Show current mode down the bottom
  set number                      " Show line numbers
  set numberwidth=4               " Number width
  set showmatch                   " Do not show matching brackets by flickering

  set incsearch                   " Shows the match while typing
  set hlsearch                    " Highlight found searches
  set ignorecase                  " Search case insensitive...
  set smartcase                   " ... but not when search pattern contains upper case characters

  set shiftwidth=4                " Default indent settings
  set softtabstop=4               " 
  set expandtab                   " 
  set autoindent                  " Automatic indentation
  set smartindent                 " Smart indent

  set encoding=utf-8              " Set default encoding to UTF-8
  set fileencodings=utf-8,ucs-bom,gbk,gb2312,gb18030,default
  set fileformats=unix,dos,mac    " Prefer Unix over Windows over OS 9 formats
  set formatoptions+=tcroqw       " 

  set splitright                  " Split vertical windows right to the current windows
  set splitbelow                  " Split horizontal windows below to the current windows
  set autowrite                   " Automatically save before :next, :make etc.
  set autoread                    " Automatically reread changed files without asking me anything
  set laststatus=2                " Always show the status line. or 1

  " theme setting {{{
    set guioptions=''
    set background=dark           " Background color
    set t_Co=256
    set guifont=Source\ Code\ Pro\ Light:h13
    colorscheme molokai
    " colorscheme solarized
    " colorscheme desert

  " }}}

  " A buffer becomes hidden when it is abandoned {{{
    set hidden
    set wildmode=list:longest
    set ttyfast

  " }}}

  " Code folding {{{
    set foldenable
    set foldmethod=indent           " manual,indent,expr,syntax,diff,marker
    set foldlevel=99

    let g:FoldMethod = 0
    map <leader>zz :call ToggleFold()<CR>
    fun! ToggleFold()
        if g:FoldMethod == 0
            exe "normal! zM"
            let g:FoldMethod = 1
        else
            exe "normal! zR"
            let g:FoldMethod = 0
        endif
    endfun

  " }}}

  " simple surround {{{
    vmap " S"
    vmap ' S'
    vmap ` S`
    vmap [ S[
    vmap ( S(
    vmap { S{
    vmap } S}
    vmap ] S]
    vmap ) S)
  " }}}

  " Smart way to move between windows {{{
    map <C-j> <C-W>j
    map <C-k> <C-W>k
    map <C-h> <C-W>h
    map <C-l> <C-W>l
  " }}}

  " Switch buffer {{{
    nmap <S-H> :bp<CR>
    nmap <S-L> :bn<CR>
  " }}}

  " Switch tab {{{
    noremap <leader>1 1gt
    noremap <leader>2 2gt
    noremap <leader>3 3gt
    noremap <leader>4 4gt
    noremap <leader>5 5gt
    noremap <leader>6 6gt
    noremap <leader>7 7gt
    noremap <leader>8 8gt
    noremap <leader>9 9gt
    noremap <leader>0 :tablast<CR>
  " }}}

  " relativenumber {{{
    set relativenumber
    augroup CursorLineOnlyInActiveWindow
        autocmd!
        autocmd InsertLeave * setlocal relativenumber
        autocmd InsertEnter * setlocal norelativenumber
        autocmd BufEnter * setlocal cursorline
        autocmd BufLeave * setlocal nocursorline
        autocmd CompleteDone *.go  call OnGolangCompleteDone()
    augroup END
    function! NumberToggle()
      if(&relativenumber == 1)
        set norelativenumber number
      else
        set relativenumber
      endif
    endfunc
    nnoremap <C-n> :call NumberToggle()<CR>
  " }}}

  " Remember last location{{{
  autocmd BufReadPost *
      \ if line("'\"")>0&&line("'\"")<=line("$") |
      \   exe "normal g'\"" |
      \ endif

  "}}}

  " auto load vimrc
  " autocmd! BufWritePost .vimrc source %

  autocmd BufNewFile,BufRead *.define setf define

  autocmd FileType go :set noexpandtab " Do not use spaces instead of tabs
  autocmd FileType lua :set shiftwidth=4 
  autocmd FileType python set tabstop=4 shiftwidth=4 expandtab ai
  autocmd FileType ruby,javascript,html,css,xml set tabstop=2 shiftwidth=2 softtabstop=2 expandtab ai

" }}}

" hotkey settings {{{
  " save file with sudo
  cmap w!! %!sudo tee > /dev/null %
  " remove searchs highlight
  noremap <silent><leader>/ :nohls<CR>
  " select all
  map <leader>sa ggvG$
  " quickly save the current file
  nnoremap <leader>w :w<CR>
  " map ; to : 
  nnoremap ; :
  " fix for ctags ctrl+] not working
  nmap <c-]> g<c-]>

  "inoremap <esc> <esc>:set iminsert=0<cr>
  " nmap <expr> <c-j> &diff ? ']c' : '<c-j>'
  " nmap <expr> <c-k> &diff ? '[c' : '<c-k>'

  if has('conceal')
      set conceallevel=2 concealcursor=niv
  endif

" }}}

" gui {{{
  if has("gui_macvim")
      " Make the window slightly transparent
      set transparency=10 
      " fullscreen
      set fullscreen

      " default <c-p>
      let g:ctrlp_map = '<D-p>'
      nmap <D-r> :CtrlPBufTag<CR>
      imap <D-r> <esc>:CtrlPBufTag<CR>
      nmap <D-R> :CtrlPBufTagAll<CR>
      imap <D-R> <esc>:CtrlPBufTagAll<CR>

      " delete buffer
      nmap <D-w> :bd<CR>
      imap <D-w> <esc>:bd<CR>

      " comment
       map <D-/> :TComment<CR>
       vmap <D-/> :TComment<CR>gv

      " ctrlsf
      nmap <D-f> :CtrlSF <C-R>=expand("<cword>")<CR>
      imap <D-f> <ESC>:CtrlSF <C-R>=expand("<cword>")<CR>
      vnoremap <D-f>  y :CtrlSF"<C-R>=escape(@", '\\/.*$^~[]()"')<CR>"

      " nerdtree
      map <D-e> :NERDTreeTabsToggle<CR>
      map <leader>e :NERDTreeFind<CR><CR>

      " Window switch map {{{
        " map <D-j> <C-W>j
        " map <D-k> <C-W>k
        " map <D-l> <C-W>l
        " map <D-h> <C-W>h
      " }}}

  endif

" }}}

" vim-go {{{
  let g:go_highlight_functions = 1
  let g:go_highlight_methods = 1
  let g:go_highlight_fields = 1
  let g:go_highlight_types = 1
  let g:go_highlight_operators = 1
  let g:go_highlight_build_constraints = 1
  let g:go_fmt_command = "goimports"
  let g:go_list_type = "quickfix"

  nmap <Leader>gc :GoErrCheck<CR>
  nmap <Leader>gb :GoBuild<CR>
  nmap <Leader>gd :GoDoc<CR>
  nmap <Leader>gt :GoTest<CR>
  nmap <Leader>gi :GoInstall<CR>
  nmap <Leader>gr :GoRename<CR>

  function! OnGolangCompleteDone()
      if !exists('v:completed_item') || empty(v:completed_item)
          return
      endif

      let complete_str = v:completed_item.word
      if complete_str == ''
          return
      endif

      let line = getline('.')
      let next_char = line[col('.')-1]
      if  next_char == "("
          return
      end
      let cur_char =line[col('.')-2]

      let abbr = v:completed_item.abbr
      let startIdx = match(abbr,"(")
      let endIdx = match(abbr,")")
      if endIdx - startIdx > 1
          let argsStr = strpart(abbr, startIdx+1, endIdx - startIdx -1)
      let argsList = split(argsStr, ",")
      let snippet = ""
      if cur_char != "("
              let snippet = "("
      end
      let c = 1
      for i in argsList
          if c > 1 
              let snippet = snippet. ", "
              endif
              " strip space
              let arg = substitute(i, '^\s*\(.\{-}\)\s*$', '\1', '') 
              let snippet = snippet . '${'.c.":".arg.'}'
              let c += 1
          endfor
          let snippet = snippet . ")$0"
          call UltiSnips#Anon(snippet)
      endif
  endfunction

" }}}

" NERDTree {{{
  let g:NERDTreeDirArrows = 0
  let g:nerdtree_tabs_open_on_gui_startup = 0

" }}}

" nerdtree-git-plugin symbols {{{
  let g:NERDTreeIndicatorMapCustom = {
      \ "Modified"  : "✹",
      \ "Staged"    : "✚",
      \ "Untracked" : "✭",
      \ "Renamed"   : "➜",
      \ "Unmerged"  : "═",
      \ "Deleted"   : "✖",
      \ "Dirty"     : "✗",
      \ "Clean"     : "✔︎",
      \ "Unknown"   : "?"
      \ }
" }}}

" vim-airline {{{
  let g:airline#extensions#tabline#enabled = 1
  let g:airline_theme='dark'
  let g:airline_powerline_fonts=0
  let g:airline#extensions#tabline#exclude_preview = 1
  let g:airline#extensions#tabline#show_buffers = 1
  let g:airline#extensions#tabline#tab_nr_type = 2 " splits and tab number
  let g:airline#extensions#bufferline#enabled = 1
" }}}

" cscope {{{
  if has("cscope")
      " set csprg=/usr/local/bin/cscope
      set csto=0
      set cscopequickfix=s-,c-,d-,i-,t-,e-
      set cst
      set nocsverb
      " add any database in current directory
      if filereadable("cscope.out")
          cs add cscope.out
          " else add database pointed to by environment
      elseif $CSCOPE_DB != ""
          cs add $CSCOPE_DB
      endif
      set csverb

      nmap <D-[> :cs find c <C-R>=expand("<cword>")<CR><CR><C-O>:copen<CR>
      nmap <D-\> :cs find s <C-R>=expand("<cword>")<CR><CR><C-O>:copen<CR>
      nmap <D-]> :cs find g <C-R>=expand("<cword>")<CR><CR>

  end

" }}}

" tagbar {{{
  map <D-y> :TagbarToggle<CR>

  let g:tagbar_autofocus=1
  let g:tagbar_sort=0
  let g:tagbar_type_go = {
      \ 'ctagstype' : 'go',
      \ 'kinds'     : [
          \ 'p:package',
          \ 'i:imports:1',
          \ 'c:constants',
          \ 'v:variables',
          \ 't:types',
          \ 'n:interfaces',
          \ 'w:fields',
          \ 'e:embedded',
          \ 'm:methods',
          \ 'r:constructor',
          \ 'f:functions'
      \ ],
      \ 'sro' : '.',
      \ 'kind2scope' : {
          \ 't' : 'ctype',
          \ 'n' : 'ntype'
      \ },
      \ 'scope2kind' : {
          \ 'ctype' : 't',
          \ 'ntype' : 'n'
      \ },
      \ 'ctagsbin'  : 'gotags',
      \ 'ctagsargs' : '-sort -silent'
  \ }

" }}}

" CtrlP {{{
  set wildignore+=*/tmp/*,*.so,*.swp,*.zip     " MacOSX/Linux
  set wildignore+=*\\tmp\\*,*.swp,*.zip,*.exe  " Windows

  let g:ctrlp_cmd = 'CtrlPMixed'               " search anything (in files, buffers and MRU files at the same time.)
  let g:ctrlp_by_filename = 1
  let g:ctrlp_working_path_mode = 'ra'         " search for nearest ancestor like .git, .hg, and the directory of the current file
  let g:ctrlp_match_window_bottom = 1          " show the match window at the top of the screen
  let g:ctrlp_max_height = 10                  " maxiumum height of match window
  let g:ctrlp_switch_buffer = 'Et'             " jump to a file if it's open already
  let g:ctrlp_use_caching = 1                  " enable caching
  let g:ctrlp_clear_cache_on_exit=1            " speed up by not removing clearing cache evertime
  let g:ctrlp_mruf_max = 250                   " number of recently opened files
  let g:ctrlp_open_new_file = 't'
  let g:ctrlp_open_multiple_files = 't'
  let g:ctrlp_open_new_file = 'r'
  let g:ctrlp_custom_ignore = {
      \ 'dir':  '\v[\/](\.git|\.hg|\.svn|\.build|github.com|labix.org|bin|pkg)$',
      \ 'file': '\v(\.exe|\.so|\.dll|\.a|\.xls|\.csv|\.json|\.log|\.out|gs|gw|gm|tags|gotags|\/U)$',
      \ 'link': 'SOME_BAD_SYMBOLIC_LINKS',
      \ }
  let g:ctrlp_buftag_types = {
      \ 'go'         : '--language-force=go --golang-types=ftv',
      \ 'as'         : '--language-force=actionscript --actionscript-types=fpvc',
      \ 'actionscript': '--language-force=actionscript --actionscript-types=fpvc',
      \ 'coffee'     : '--language-force=coffee --coffee-types=cmfvf',
      \ 'markdown'   : '--language-force=markdown --markdown-types=hik',
      \ 'objc'       : '--language-force=objc --objc-types=mpci',
      \ 'rc'         : '--language-force=rust --rust-types=fTm'
      \ }
  let g:ctrlp_prompt_mappings = {
      \ 'PrtBS()':              ['<bs>', '<c-]>'],
      \ 'PrtDelete()':          ['<del>'],
      \ 'PrtDeleteWord()':      ['<c-w>'],
      \ 'PrtClear()':           ['<c-u>'],
      \ 'PrtSelectMove("j")':   ['<c-j>', '<down>'],
      \ 'PrtSelectMove("k")':   ['<c-k>', '<up>'],
      \ 'PrtSelectMove("t")':   ['<Home>', '<kHome>'],
      \ 'PrtSelectMove("b")':   ['<End>', '<kEnd>'],
      \ 'PrtSelectMove("u")':   ['<PageUp>', '<kPageUp>'],
      \ 'PrtSelectMove("d")':   ['<PageDown>', '<kPageDown>'],
      \ 'PrtHistory(-1)':       ['<c-n>'],
      \ 'PrtHistory(1)':        ['<c-p>'],
      \ 'AcceptSelection("e")': ['<cr>', '<2-LeftMouse>'],
      \ 'AcceptSelection("h")': ['<c-x>', '<c-cr>', '<c-s>'],
      \ 'AcceptSelection("t")': ['<c-t>'],
      \ 'AcceptSelection("v")': ['<c-v>', '<RightMouse>'],
      \ 'ToggleFocus()':        ['<s-tab>'],
      \ 'ToggleRegex()':        ['<c-r>'],
      \ 'ToggleByFname()':      ['<c-d>'],
      \ 'ToggleType(1)':        ['<c-f>', '<c-up>'],
      \ 'ToggleType(-1)':       ['<c-b>', '<c-down>'],
      \ 'PrtExpandDir()':       ['<tab>'],
      \ 'PrtInsert("c")':       ['<MiddleMouse>', '<insert>'],
      \ 'PrtInsert()':          ['<c-\>'],
      \ 'PrtCurStart()':        ['<c-a>'],
      \ 'PrtCurEnd()':          ['<c-e>'],
      \ 'PrtCurLeft()':         ['<c-h>', '<left>', '<c-^>'],
      \ 'PrtCurRight()':        ['<c-l>', '<right>'],
      \ 'PrtClearCache()':      ['<F5>'],
      \ 'PrtDeleteEnt()':       ['<F7>'],
      \ 'CreateNewFile()':      ['<c-y>'],
      \ 'MarkToOpen()':         ['<c-z>'],
      \ 'OpenMulti()':          ['<D-o>'],
      \ 'PrtExit()':            ['<esc>', '<c-c>', '<c-g>'],
      \ }

" }}}

" syntastic {{{
  set statusline+=%#warningmsg#
  set statusline+=%{SyntasticStatuslineFlag()}
  set statusline+=%*

  let g:syntastic_check_on_wq=1
  let g:syntastic_auto_jump=1
  let g:syntastic_auto_loc_list=1
  let g:syntastic_error_symbol = "▶▶"
  let g:syntastic_warning_symbol = "⚠"

  " let g:syntastic_go_checkers = ['golint', 'govet', 'errcheck']
  " passive
  let g:syntastic_mode_map = { "mode": "active",
      \ "active_filetypes": ["ruby", "go", "python"],
      \ "passive_filetypes": ["shell"] }

" }}}

" CtrlSF {{{
  command! CO CtrlSFOpen

  let g:ctrlsf_winsize = '30%'
  let g:ctrlsf_auto_close = 0

" }}}

" YouCompleteMe {{{
  let g:ycm_error_symbol = '>>'
  let g:ycm_warning_symbol = '>*'

  " Specifies Python interpreter to run jedi
  let g:ycm_python_binary_path = 'python'

  " Completion when typing inside comments
  let g:ycm_complete_in_comments = 1  

  " Query the UltiSnips plugin
  let g:ycm_use_ultisnips_completer = 1 

  " Collect identifiers from strings and comments
  let g:ycm_collect_identifiers_from_comments_and_strings = 1   

  " " Seed its identifier database
  " let g:ycm_seed_identifiers_with_syntax=1

  " collect identifiers from tags files
  let g:ycm_collect_identifiers_from_tags_files = 1

  " typing 2 chars
  let g:ycm_min_num_of_chars_for_completion = 2 

  "youcompleteme  默认tab  s-tab 和自动补全冲突
  let g:ycm_key_list_select_completion = ['<Enter>', '<Down>']
  let g:ycm_key_list_previous_completion = ['<S-TAB>', '<Up>']

  " Where GoTo* commands result should be opened, same-buffer
  let g:ycm_goto_buffer_command = 'horizontal-split'
  " nnoremap <leader>jd :YcmCompleter GoToDefinition<CR>
  nnoremap <leader>jd :YcmCompleter GoToDefinitionElseDeclaration<CR>
  nnoremap <leader>gd :YcmCompleter GoToDeclaration<CR>

  let g:ycm_global_ycm_extra_conf = "~/.vim/bundle/YouCompleteMe/third_party/ycmd/cpp/ycm/.ycm_extra_conf.py"
  " blacklist
  let g:ycm_filetype_blacklist = {
      \ 'tagbar' : 1,
      \ 'gitcommit' : 1,
      \}

" }}}

" UltiSnips {{{
    let g:UltiSnipsExpandTrigger       = "<tab>"
    let g:UltiSnipsJumpForwardTrigger  = "<tab>"
    let g:UltiSnipsJumpBackwardTrigger = "<s-tab>"
    let g:UltiSnipsSnippetDirectories  = ['UltiSnips']
    let g:UltiSnipsSnippetsDir = '~/.vim/UltiSnips'
    " 定义存放代码片段的文件夹 .vim/UltiSnips下,使用自定义和默认的,将会的到全局,有冲突的会提示
    " 进入对应filetypesnippets进行编辑
    map <leader>us :UltiSnipsEdit<CR>

    " ctrl+j/k 进行选择
    func! g:JInYCM()
        if pumvisible()
            return "\<C-n>"
        else
            return "\<c-j>"
        endif
    endfunction

    func! g:KInYCM()
        if pumvisible()
            return "\<C-p>"
        else
            return "\<c-k>"
        endif
    endfunction
    inoremap <c-j> <c-r>=g:JInYCM()<cr>
    au BufEnter,BufRead * exec "inoremap <silent> " . g:UltiSnipsJumpBackwordTrigger . " <C-R>=g:KInYCM()<cr>"
    let g:UltiSnipsJumpBackwordTrigger = "<c-k>"
" }}}

" delimitMate {{{
  let g:delimitMate_expand_cr = 1
  let delimitMate_balance_matchpairs = 1
  let g:delimitMate_expand_space = 2

  imap <expr> <TAB> delimitMate#ShouldJump() ? "<Plug>delimitMateS-Tab" : "<TAB>"
  inoremap <expr> <S-Tab> delimitMate#JumpAny()
" }}}

" easymotion {{{
  let g:EasyMotion_smartcase = 1
  "let g:EasyMotion_startofline = 0 " keep cursor colum when JK motion
  map <Leader><leader>h <Plug>(easymotion-linebackward)
  map <Leader><Leader>j <Plug>(easymotion-j)
  map <Leader><Leader>k <Plug>(easymotion-k)
  map <Leader><leader>l <Plug>(easymotion-lineforward)
  map <Leader><leader>. <Plug>(easymotion-repeat)

" }}}

" fugitive {{{
  " :Gdiff  :Gstatus :Gvsplit
  " use zsh alias
  nnoremap <leader>gaa :Git add .<CR>
  nnoremap <leader>gc :Gcommit<CR>
  nnoremap <leader>gp :Gpush<CR>
  nnoremap <leader>gl :Gpull<CR>
  nnoremap <leader>gb  :Gblame<CR>
  nnoremap <leader>gst :Gstatus<CR>
  nnoremap <leader>gd :Gdiff<CR>
  nnoremap <leader>glg :Glog<CR>

" }}}

" multiplecursors {{{
  let g:multi_cursor_use_default_mapping=0
  " Default mapping
  let g:multi_cursor_next_key='<C-m>'
  let g:multi_cursor_prev_key='<C-p>'
  let g:multi_cursor_skip_key='<C-x>'
  let g:multi_cursor_quit_key='<Esc>'
" }}}

hi Pmenu      guifg=#F6F3E8 guibg=#444444
" hi PmenuSel   guifg=#FFFFFF guibg=#0077DD
hi PmenuSel   guifg=#FFFFFF guibg=#11AADD
hi PMenuSbar  guibg=#5A647E
hi PMenuThumb guibg=#AAAAAA
" hi Visual     guibg=#1122FF
" hi Visual     guibg=#0066FF
hi Visual     guibg=#2566FA
" hi VertSplit guibg=#272822
hi VertSplit guibg=#1B1D1E
hi Cursor guibg=#FF0000

一天搞懂深度学习

阅读数 1899

一天搞懂深度学习

博文 来自: seanliu96
没有更多推荐了,返回首页