Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/caffe/layer_factory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,14 @@ shared_ptr<Layer<Dtype> > GetPoolingLayer(const LayerParameter& param) {
#ifdef USE_CUDNN
} else if (engine == PoolingParameter_Engine_CUDNN) {
PoolingParameter p_param = param.pooling_param();

// FIXME We assume that precision issue will be fixed in cuDNN v5.0
#if CUDNN_VERSION >= 5000
return shared_ptr<Layer<Dtype> >(new CuDNNPoolingLayer<Dtype>(param));
#else
return shared_ptr<Layer<Dtype> >(new PoolingLayer<Dtype>(param));
#endif

#endif
} else {
LOG(FATAL) << "Layer " << param.name() << " has unknown engine.";
Expand Down
4 changes: 4 additions & 0 deletions src/caffe/layers/cudnn_batch_norm_layer.cu
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ void CuDNNBatchNormLayer<Dtype>::Backward_gpu(
mode_,
cudnn::dataType<Dtype>::one,
cudnn::dataType<Dtype>::zero,
#if CUDNN_VERSION >= 4005
cudnn::dataType<Dtype>::one,
cudnn::dataType<Dtype>::zero,
#endif
bottom_desc_,
bottom_data,
bottom_desc_,
Expand Down