| 7 | |
| 8 | template<typename Dtype> |
| 9 | void BatchReindexLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom, |
| 10 | const vector<Blob<Dtype>*>& top) { |
| 11 | CHECK_EQ(1, bottom[1]->num_axes()); |
| 12 | vector<int> newshape; |
| 13 | newshape.push_back(bottom[1]->shape(0)); |
| 14 | for (int i = 1; i < bottom[0]->shape().size(); ++i) { |
| 15 | newshape.push_back(bottom[0]->shape()[i]); |
| 16 | } |
| 17 | top[0]->Reshape(newshape); |
| 18 | } |
| 19 | |
| 20 | template<typename Dtype> |
| 21 | void BatchReindexLayer<Dtype>::check_batch_reindex(int initial_num, |