| 21 | |
| 22 | template <typename Dtype> |
| 23 | void CuDNNPoolingLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, |
| 24 | const vector<Blob<Dtype>*>& top) { |
| 25 | PoolingLayer<Dtype>::Reshape(bottom, top); |
| 26 | cudnn::setTensor4dDesc<Dtype>(&bottom_desc_, bottom[0]->num(), |
| 27 | this->channels_, this->height_, this->width_); |
| 28 | cudnn::setTensor4dDesc<Dtype>(&top_desc_, bottom[0]->num(), |
| 29 | this->channels_, this->pooled_height_, this->pooled_width_); |
| 30 | } |
| 31 | |
| 32 | template <typename Dtype> |
| 33 | CuDNNPoolingLayer<Dtype>::~CuDNNPoolingLayer() { |