【发布时间】:2017-09-04 11:26:46
【问题描述】:
我知道 CAFFE 中的几乎层都可以在 CPU/GPU 中运行。在 GPU 的情况下,它有一些模式,称为引擎。如果engine=CAFFE,它将使用 GPU 运行,engine=CUDNN,它将基于 CUDA 代码运行。默认为默认模式
在我的 Makefile.config 中,我在构建 caffe 时打开了 CUDNN 模式
# cuDNN acceleration switch (uncomment to build with cuDNN).
USE_CUDNN := 1
在我的prototxt中,我有一个层,例如,反卷积层
layer {
name: "DeconvolutionLayer"
type: "Deconvolution"
bottom: "conv1"
top: "DeconvolutionLayer"
param {
lr_mult: 1
decay_mult: 1
}
convolution_param {
num_output: 128
bias_term: false
pad: 0
kernel_size: 2
stride: 2
weight_filler {
type: "msra"
}
}
}
请注意,我没有为 engine 标志设置任何值。当我运行时,将使用哪种模式,GPU 还是 CUDNN?训练脚本是
caffe/build/tools/caffe train --solver=solver.prototxt -gpu 0
【问题讨论】:
标签: machine-learning deep-learning caffe