From: Jeff Donahue Date: Fri, 14 Mar 2014 01:16:21 +0000 (-0700) Subject: revert unnecessary reordering of lines in softmaxwithlosslayer backward X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=74ed9e0148cdd1b02a524a501ef04c37562345fe;p=platform%2Fupstream%2Fcaffe.git revert unnecessary reordering of lines in softmaxwithlosslayer backward --- diff --git a/src/caffe/layers/softmax_loss_layer.cpp b/src/caffe/layers/softmax_loss_layer.cpp index 4238cf6..f9bd82e 100644 --- a/src/caffe/layers/softmax_loss_layer.cpp +++ b/src/caffe/layers/softmax_loss_layer.cpp @@ -48,8 +48,8 @@ void SoftmaxWithLossLayer::Backward_cpu(const vector*>& top, // Compute the diff Dtype* bottom_diff = (*bottom)[0]->mutable_cpu_diff(); const Dtype* prob_data = prob_.cpu_data(); - const Dtype* label = (*bottom)[1]->cpu_data(); memcpy(bottom_diff, prob_data, sizeof(Dtype) * prob_.count()); + const Dtype* label = (*bottom)[1]->cpu_data(); int num = prob_.num(); int dim = prob_.count() / num; for (int i = 0; i < num; ++i) {