| 29 | |
| 30 | template <typename Dtype> |
| 31 | void 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[i]->shape() == bottom[0]->shape()); |
| 35 | } |
| 36 | top[0]->ReshapeLike(*bottom[0]); |
| 37 | // If max operation, we will initialize the vector index part. |
| 38 | if (this->layer_param_.eltwise_param().operation() == |
| 39 | EltwiseParameter_EltwiseOp_MAX && top.size() == 1) { |
| 40 | max_idx_.Reshape(bottom[0]->shape()); |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | template <typename Dtype> |
| 45 | void EltwiseLayer<Dtype>::Forward_cpu( |
nothing calls this directly
no test coverage detected