summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFisher Yu <i@yf.io>2016-08-06 23:01:45 -0400
committerFisher Yu <i@yf.io>2016-08-06 23:01:45 -0400
commit61e01654d2054531133a6d154a69b872a4479099 (patch)
tree09734b850dd3512b32aba3653dea9d2f5c4bfe20
parent64314779c040f0148cc8a3700d27fa8be9017198 (diff)
downloadcaffeonacl-61e01654d2054531133a6d154a69b872a4479099.tar.gz
caffeonacl-61e01654d2054531133a6d154a69b872a4479099.tar.bz2
caffeonacl-61e01654d2054531133a6d154a69b872a4479099.zip
num in blob is deprecated
-rw-r--r--src/caffe/layers/loss_layer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/caffe/layers/loss_layer.cpp b/src/caffe/layers/loss_layer.cpp
index c0b7a862..afb1ce94 100644
--- a/src/caffe/layers/loss_layer.cpp
+++ b/src/caffe/layers/loss_layer.cpp
@@ -16,8 +16,8 @@ void LossLayer<Dtype>::LayerSetUp(
template <typename Dtype>
void LossLayer<Dtype>::Reshape(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
- CHECK_EQ(bottom[0]->num(), bottom[1]->num())
- << "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.";
vector<int> loss_shape(0); // Loss layers output a scalar; 0 axes.
top[0]->Reshape(loss_shape);
}