Ubuntu下载常用软件和使用Caffe时的常见问题

###2018年2月4日
#####下载:

###2018年2月5日
#####下载:

#如果出现依赖错误,使用以下命令解决后再运行安装包
sudo apt-get install -f

#####使用Caffe时常见问题:

sudo pip install easydict
sudo apt-get install python-opencv

###2018年2月6日
#####下载:

cd /usr/local/MATLAB/R2015b/bin
sudo ./matlab
问题:
 EnvironmentError: MATLAB command 'matlab' not found.Please add 'matlab' to yourPATH
解决方法:
 export PATH=$PATH:"/usr/local/MATLAB/R2015b/bin"

###2018年2月26日

###2018年3月4日

问题:
build/examples/mnist/convert_mnist_data.bin: error while loading shared libraries: libcudart.so.8.0: cannot open shared object file: No such file or directory
解决方法:
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
export PATH=/usr/local/cuda/bin:$PATH

###2018年3月5日

error while loading shared libraries: libcudnn.so.5: cannot open shared object file: No such file or directory,


###2018年3月15日

###2018年3月28日

###2018年4月4日

###2018年4月10日

###2018年4月18日

pkg-config --modversion opencv
pkg-config: 可用与列举出某个库的相关信息,比如此库的路径、相关头文件路径等,这在程序编译时将非常有用。

###2018年4月19日
Caffe技巧之使用snapshot来继续网络训练

$TOOLS/caffe train --solver=examples/cifar10/cifar10_quick_solver.prototxt --snapshot=examples/cifar/cifar_quick_iter_3000.solverstate

###2018年4月22日

###2018年5月8日
-ubuntu14.04,“系统设置”中没有了“语言支持”和“文本输入”怎么办?

###2018年7月3日

训练faster rcnn的时候遇到以下问题,这是因为这个版本所用的cudnn为旧版本的,可能与新环境的cudnn不兼容所导致的错误。

In file included from ./include/caffe/util/cudnn.hpp:5:0,  
       from./include/caffe/util/device_alternate.hpp:40,  
       from ./include/caffe/common.hpp:19,  
       from ./include/caffe/util/db.hpp:6,  
       from src/caffe/util/db.cpp:1:  
 /usr/local/cuda/include/cudnn.h:803:27: note: declared here  
 cudnnStatus_t CUDNNWINAPI cudnnSetPooling2dDescriptor(  
                               ^  
make: *** [.build_release/src/caffe/util/db.o] Error 1  

解决方法:
(1) 将/py-faster-rcnn/caffe-fast-rcnn/include/caffe/util/cudnn.hpp 换成最新版的caffe里的cudnn的实现,即相应的cudnn.hpp.
(2) 将/py-faster-rcnn/caffe-fast-rcnn/src/caffe/layer里的,所有以cudnn开头的文件都替换成最新版的caffe里的相应的同名文件。

layer

{
  name:"conv4"
  type:"Convolution"

  bottom: "conv3"
  top: "conv4"
  propagate_down : 0
  convolution_param {
    num_output: 64
    pad: 1
    kernel_size: 3
    stride: 1
    weight_filler {
      type: "msra"
    }
  bias_filler {
    type: "constant"
  }
  }
}
layer {
    name: "conv3"
    type: "Convolution"
    bottom: "conv2"
    top: "conv3"
    param {
        lr_mult: 0.000000
    }
    param {
        lr_mult: 0.000000
    }
    convolution_param {
        num_output: 64
        kernel_size: 3
        stride: 1
        pad: 1
         weight_filler {
      type: "msra"
    }
    bias_filler {
      type: "constant"
    }
    }
}

训练caffe版本的faster r-cnn时,遇到的几个问题基本都在这里有解决方案,大部分问题都是因为numpy版本不兼容引起的。(谁让faster r-cnn出来这么久了,这个过程中很多python的库都更新过了)

###2018年7月9日
优化算法使用Adam

train.py

# 使用Adamsolver,即随机梯度下降算法  
solver=caffe.AdamSolver('/root/caffe/examples/mnist/lenet_solver_adam.prototxt')

train.prototxt

train_net: "nin_train_val.prototxt"
base_lr: 0.001
solver_type: ADAM
momentum: 0.9
momentum2: 0.999
delta: 1e-8
lr_policy: "fixed"
 
display: 100
max_iter: 50000
weight_decay: 0.0005
snapshot: 5000
snapshot_prefix: "./stage1/sgd_DeepBit1024_alex_stage1"
solver_mode: GPU

###2018年8月27日

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值