diff --git a/test/operators/test_sequence_softmax_op.cpp b/test/operators/test_sequence_softmax_op.cpp index 9e698d933a97525dac32948466e2600a9b217033..17ab5d7a653a0bb57892ced969ef199a9bde16c3 100644 --- a/test/operators/test_sequence_softmax_op.cpp +++ b/test/operators/test_sequence_softmax_op.cpp @@ -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; } diff --git a/test/operators/test_softmax_op.cpp b/test/operators/test_softmax_op.cpp index e94933eaa90f96982f90f713e04f05a999424697..1cf39e3effeb8761fb105858ed302cac1cf95872 100644 --- a/test/operators/test_softmax_op.cpp +++ b/test/operators/test_softmax_op.cpp @@ -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; }