Skip to content
Open
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
3 changes: 0 additions & 3 deletions include/caffe/layers/cudnn_lcn_layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ class CuDNNLCNLayer : public LRNLayer<Dtype> {
cudnnLRNDescriptor_t norm_desc_;
cudnnTensorDescriptor_t bottom_desc_, top_desc_;

int size_, pre_pad_;
Dtype alpha_, beta_, k_;

size_t tempDataSize;
void *tempData1, *tempData2;
};
Expand Down
9 changes: 2 additions & 7 deletions src/caffe/layers/cudnn_lcn_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,6 @@ void CuDNNLCNLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,

// create a LRN handle
handles_setup_ = true;

size_ = this->layer_param().lrn_param().local_size();
pre_pad_ = (size_ - 1) / 2;
alpha_ = this->layer_param().lrn_param().alpha();
beta_ = this->layer_param().lrn_param().beta();
k_ = this->layer_param().lrn_param().k();
}

template <typename Dtype>
Expand All @@ -33,7 +27,8 @@ void CuDNNLCNLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
this->channels_, this->height_, this->width_);
cudnn::setTensor4dDesc<Dtype>(&top_desc_, bottom[0]->num(),
this->channels_, this->height_, this->width_);
CUDNN_CHECK(cudnnSetLRNDescriptor(norm_desc_, size_, alpha_, beta_, k_));
CUDNN_CHECK(cudnnSetLRNDescriptor(norm_desc_, this->size_, this->alpha_,
this->beta_, this->k_));

// allocate / reallocate tempData buffers
size_t totalSizeInBytes = sizeof(Dtype)*bottom[0]->num()* \
Expand Down