diff options
Diffstat (limited to 'src/caffe/layers/softmax_loss_layer.cu')
-rw-r--r-- | src/caffe/layers/softmax_loss_layer.cu | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/caffe/layers/softmax_loss_layer.cu b/src/caffe/layers/softmax_loss_layer.cu index 660e1b39..6c8db142 100644 --- a/src/caffe/layers/softmax_loss_layer.cu +++ b/src/caffe/layers/softmax_loss_layer.cu @@ -61,6 +61,8 @@ void SoftmaxWithLossLayer<Dtype>::Forward_gpu( if (top.size() == 2) { top[1]->ShareData(prob_); } + + caffe_gpu_set(bottom[0]->count(), Dtype(0), bottom[0]->mutable_gpu_diff()); } template <typename Dtype> |