fix softmax loss layer bug; all tests pass
authorJeff Donahue <jeff.donahue@gmail.com>
Fri, 14 Mar 2014 05:44:41 +0000 (22:44 -0700)
committerJeff Donahue <jeff.donahue@gmail.com>
Wed, 19 Mar 2014 19:37:31 +0000 (12:37 -0700)
src/caffe/layers/softmax_loss_layer.cu

index 5039524..ab7ee6e 100644 (file)
@@ -16,9 +16,7 @@ template <typename Dtype>
 Dtype SoftmaxWithLossLayer<Dtype>::Forward_gpu(
     const vector<Blob<Dtype>*>& bottom, vector<Blob<Dtype>*>* top) {
   // The forward pass computes the softmax prob values.
-  softmax_bottom_vec_[0] = bottom[0];
-  softmax_layer_->Forward(softmax_bottom_vec_, &softmax_top_vec_);
-  return Dtype(0);
+  return Forward_cpu(bottom, top);
 }
 
 template <typename Dtype>