зеркало из https://github.com/microsoft/caffe.git
revert unnecessary reordering of lines in softmaxwithlosslayer backward
This commit is contained in:
Родитель
d54833e7d5
Коммит
74ed9e0148
|
@ -48,8 +48,8 @@ void SoftmaxWithLossLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& 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) {
|
||||
|
|
Загрузка…
Ссылка в новой задаче