| 15 | |
| 16 | template <typename Dtype> |
| 17 | void NmsLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top){ |
| 18 | std::vector<int> bottom_shape = bottom[0]->shape(); |
| 19 | std::vector<int> top_shape(bottom_shape); |
| 20 | |
| 21 | top_shape[3] = 3; // X, Y, score |
| 22 | top_shape[2] = max_peaks_+1; // 10 people + 1 |
| 23 | top_shape[1] = num_parts_; |
| 24 | |
| 25 | top[0]->Reshape(top_shape); |
| 26 | workspace.Reshape(bottom_shape); |
| 27 | |
| 28 | //std::cout << "cpu here!" << std::endl; |
| 29 | } |
| 30 | |
| 31 | template <typename Dtype> |
| 32 | void NmsLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top){ |