MCPcopy Create free account
hub / github.com/BVLC/caffe / Reshape

Method Reshape

src/caffe/layers/tile_layer.cpp:9–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7
8template <typename Dtype>
9void 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
23template <typename Dtype>
24void TileLayer<Dtype>::Forward_cpu(

Callers

nothing calls this directly

Calls 3

CanonicalAxisIndexMethod · 0.80
shapeMethod · 0.80
countMethod · 0.80

Tested by

no test coverage detected