!46365 [MS][LITE]Add Sigmod ut

Merge pull request !46365 from gongdaguo1/add_sigmod_ut
This commit is contained in:
i-robot 2022-12-06 01:18:10 +00:00 committed by Gitee
commit c337b69c55
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 5 additions and 0 deletions

View File

@ -70,6 +70,11 @@ TEST_F(TestActivationFp32, SigmoidFp32) {
std::cout << output[i] << " ";
}
std::cout << std::endl;
input[0] = -1.85524821;
float expect[1] = {0.13525787};
Sigmoid(input, 1, output);
ASSERT_EQ(fabs(output[0] - expect[0]) < 0.000001, true);
MS_LOG(INFO) << "TestSigmoidFp32 passed";
}