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

Method Reshape

src/caffe/layers/eltwise_layer.cpp:31–44  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29
30template <typename Dtype>
31void EltwiseLayer<Dtype>::Reshape(const vector<Blob<Dtype>*>& bottom,
32 const vector<Blob<Dtype>*>& top) {
33 for (int i = 1; i < bottom.size(); ++i) {
34 CHECK(bottom[0]->shape() == bottom[i]->shape())
35 << "bottom[0]: " << bottom[0]->shape_string()
36 << ", bottom[" << i << "]: " << bottom[i]->shape_string();
37 }
38 top[0]->ReshapeLike(*bottom[0]);
39 // If max operation, we will initialize the vector index part.
40 if (this->layer_param_.eltwise_param().operation() ==
41 EltwiseParameter_EltwiseOp_MAX && top.size() == 1) {
42 max_idx_.Reshape(bottom[0]->shape());
43 }
44}
45
46template <typename Dtype>
47void EltwiseLayer<Dtype>::Forward_cpu(

Callers

nothing calls this directly

Calls 4

shapeMethod · 0.80
shape_stringMethod · 0.80
ReshapeLikeMethod · 0.80
sizeMethod · 0.45

Tested by

no test coverage detected