virtual void Reshape(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top);
virtual ~CuDNNPoolingLayer();
+ // Currently, cuDNN does not support the extra top blob.
+ virtual inline int MinTopBlobs() const { return -1; }
+ virtual inline int ExactNumTopBlobs() const { return 1; }
protected:
virtual void Forward_gpu(const vector<Blob<Dtype>*>& bottom,
void CuDNNPoolingLayer<Dtype>::LayerSetUp(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
PoolingLayer<Dtype>::LayerSetUp(bottom, top);
- // Sanity check: CUDNN currently only supports pad=0 and top.size()=1 cases.
+ // Sanity check: CUDNN currently only supports pad == 0.
CHECK_EQ(this->pad_h_, 0);
CHECK_EQ(this->pad_w_, 0);
- CHECK_EQ(top.size(), 1);
CUDNN_CHECK(cudnnCreate(&handle_));
cudnn::createTensor4dDesc<Dtype>(&bottom_desc_);
cudnn::createTensor4dDesc<Dtype>(&top_desc_);