| 7 | |
| 8 | template <typename Dtype> |
| 9 | void TileLayer<Dtype>::Reshape( |
| 10 | const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) { |
| 11 | const TileParameter& tile_param = this->layer_param_.tile_param(); |
| 12 | axis_ = bottom[0]->CanonicalAxisIndex(tile_param.axis()); |
| 13 | CHECK(tile_param.has_tiles()) << "Number of tiles must be specified"; |
| 14 | tiles_ = tile_param.tiles(); |
| 15 | CHECK_GT(tiles_, 0) << "Number of tiles must be positive."; |
| 16 | vector<int> top_shape = bottom[0]->shape(); |
| 17 | top_shape[axis_] = bottom[0]->shape(axis_) * tiles_; |
| 18 | top[0]->Reshape(top_shape); |
| 19 | outer_dim_ = bottom[0]->count(0, axis_); |
| 20 | inner_dim_ = bottom[0]->count(axis_); |
| 21 | } |
| 22 | |
| 23 | template <typename Dtype> |
| 24 | void TileLayer<Dtype>::Forward_cpu( |
nothing calls this directly
no test coverage detected