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

Method Reshape

src/caffe/layers/loss_layer.cpp:17–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

15
16template <typename Dtype>
17void LossLayer<Dtype>::Reshape(
18 const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
19 CHECK_EQ(bottom[0]->shape(0), bottom[1]->shape(0))
20 << "The data and label should have the same first dimension.";
21 vector<int> loss_shape(0); // Loss layers output a scalar; 0 axes.
22 top[0]->Reshape(loss_shape);
23}
24
25INSTANTIATE_CLASS(LossLayer);
26

Callers

nothing calls this directly

Calls 1

shapeMethod · 0.80

Tested by

no test coverage detected