From 6ed135413a71bc2e5a44d762af564d056a5165c3 Mon Sep 17 00:00:00 2001 From: guosheng Date: Tue, 28 Nov 2017 21:49:39 +0800 Subject: [PATCH] Fix useGpu in HierarchicalSigmoidLayer --- paddle/gserver/layers/HierarchicalSigmoidLayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp b/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp index 6317b66a45..236f8096bd 100644 --- a/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp +++ b/paddle/gserver/layers/HierarchicalSigmoidLayer.cpp @@ -164,7 +164,7 @@ void HierarchicalSigmoidLayer::backward(const UpdateCallback& callback) { cpuBias_ = biases_grad; } preOutput_.grad->addByBitCodeBackward(numClasses_, *cpuLabel_, *cpuBias_); - if (useGpu) { + if (useGpu_) { biases_grad->copyFrom(*cpuBias_); } else { biases_grad = cpuBias_; -- GitLab