diff --git a/src/caffe/layers/base_conv_layer.cpp b/src/caffe/layers/base_conv_layer.cpp index 35c90145e31..aff0a7548c7 100644 --- a/src/caffe/layers/base_conv_layer.cpp +++ b/src/caffe/layers/base_conv_layer.cpp @@ -193,7 +193,9 @@ void BaseConvolutionLayer::Reshape(const vector*>& bottom, // TODO: generalize to handle inputs of different shapes. for (int bottom_id = 1; bottom_id < bottom.size(); ++bottom_id) { CHECK(bottom[0]->shape() == bottom[bottom_id]->shape()) - << "All inputs must have the same shape."; + << "shape mismatch - bottom[0]: " << bottom[0]->shape_string() + << " vs. bottom[" << bottom_id << "]: " + << bottom[bottom_id]->shape_string(); } // Shape the tops. bottom_shape_ = &bottom[0]->shape(); diff --git a/src/caffe/layers/recurrent_layer.cpp b/src/caffe/layers/recurrent_layer.cpp index e0c82773392..9cd3206f66a 100644 --- a/src/caffe/layers/recurrent_layer.cpp +++ b/src/caffe/layers/recurrent_layer.cpp @@ -214,8 +214,9 @@ void RecurrentLayer::Reshape(const vector*>& bottom, const int bottom_offset = 2 + static_input_; for (int i = bottom_offset, j = 0; i < bottom.size(); ++i, ++j) { CHECK(recur_input_blobs_[j]->shape() == bottom[i]->shape()) - << "bottom[" << i << "] shape must match hidden state input shape: " - << recur_input_blobs_[j]->shape_string(); + << "shape mismatch - recur_input_blobs_[" << j << "]: " + << recur_input_blobs_[j]->shape_string() + << " vs. bottom[" << i << "]: " << bottom[i]->shape_string(); recur_input_blobs_[j]->ShareData(*bottom[i]); } } diff --git a/src/caffe/layers/slice_layer.cpp b/src/caffe/layers/slice_layer.cpp index 759beafe0d9..64de0964483 100644 --- a/src/caffe/layers/slice_layer.cpp +++ b/src/caffe/layers/slice_layer.cpp @@ -41,7 +41,9 @@ void SliceLayer::Reshape(const vector*>& bottom, int count = 0; if (slice_point_.size() != 0) { CHECK_EQ(slice_point_.size(), top.size() - 1); - CHECK_LE(top.size(), bottom_slice_axis); + CHECK_LE(top.size(), bottom_slice_axis) + << "slice axis: " << slice_axis_ + << ", bottom[0] shape: " << bottom[0]->shape_string(); int prev = 0; vector slices; for (int i = 0; i < slice_point_.size(); ++i) {