We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 2f35480 + 3616595 commit 5e1603fCopy full SHA for 5e1603f
src/caffe/layers/loss_layer.cpp
@@ -16,8 +16,8 @@ void LossLayer<Dtype>::LayerSetUp(
16
template <typename Dtype>
17
void LossLayer<Dtype>::Reshape(
18
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
19
- CHECK_EQ(bottom[0]->num(), bottom[1]->num())
20
- << "The data and label should have the same number.";
+ CHECK_EQ(bottom[0]->shape(0), bottom[1]->shape(0))
+ << "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
}
0 commit comments