提交 59812f31 编写于 作者: H Houjiang Chen 提交者: GitHub

Merge pull request #1388 from hjchen2/fix1386

Fix #1386
......@@ -34,7 +34,7 @@ void SequenceSoftmax(const framework::LoDTensor *X, framework::LoDTensor *Y) {
}
float sum = 0.f;
for (int j = 0; j < num_classes; ++j) {
float tmp = std::expf(input[j] - max);
float tmp = expf(input[j] - max);
sum += tmp;
output[j] = tmp;
}
......
......@@ -38,7 +38,7 @@ void Softmax(const framework::Tensor *X, framework::Tensor *Y) {
}
float sum = 0.f;
for (int j = 0; j < num_classes; ++j) {
float tmp = std::expf(input[j] - max);
float tmp = expf(input[j] - max);
sum += tmp;
output[j] = tmp;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册