Skip to content

Commit

Permalink
EuclideanLossLayer: generalized Blob dims
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdonahue committed Dec 2, 2014
1 parent 76b7389 commit 3bd2c0c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/caffe/layers/euclidean_loss_layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,8 @@ template <typename Dtype>
void EuclideanLossLayer<Dtype>::Reshape(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top) {
LossLayer<Dtype>::Reshape(bottom, top);
CHECK_EQ(bottom[0]->channels(), bottom[1]->channels());
CHECK_EQ(bottom[0]->height(), bottom[1]->height());
CHECK_EQ(bottom[0]->width(), bottom[1]->width());
diff_.Reshape(bottom[0]->num(), bottom[0]->channels(),
bottom[0]->height(), bottom[0]->width());
CHECK(bottom[0]->shape() == bottom[1]->shape());
diff_.ReshapeLike(*bottom[0]);
}

template <typename Dtype>
Expand Down

0 comments on commit 3bd2c0c

Please sign in to comment.