提交 e80428fc 编写于 作者: L Liangliang He

Merge branch 'relative-error' into 'master'

Relax batchnorm and fc op test precision.

See merge request !384
...@@ -219,7 +219,7 @@ TEST_F(BatchNormOpTest, SimpleRandomHalfOPENCL) { ...@@ -219,7 +219,7 @@ TEST_F(BatchNormOpTest, SimpleRandomHalfOPENCL) {
ImageToBuffer<DeviceType::OPENCL, float>(&net, "OutputImage", "OPENCLOutput", ImageToBuffer<DeviceType::OPENCL, float>(&net, "OutputImage", "OPENCLOutput",
kernels::BufferType::IN_OUT_CHANNEL); kernels::BufferType::IN_OUT_CHANNEL);
ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"), 1e-2, 1e-2); ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"), 1e-1, 1e-2);
} }
TEST_F(BatchNormOpTest, ComplexRandomOPENCL) { TEST_F(BatchNormOpTest, ComplexRandomOPENCL) {
...@@ -362,7 +362,7 @@ TEST_F(BatchNormOpTest, ComplexRandomHalfOPENCL) { ...@@ -362,7 +362,7 @@ TEST_F(BatchNormOpTest, ComplexRandomHalfOPENCL) {
ImageToBuffer<DeviceType::OPENCL, float>(&net, "OutputImage", "OPENCLOutput", ImageToBuffer<DeviceType::OPENCL, float>(&net, "OutputImage", "OPENCLOutput",
kernels::BufferType::IN_OUT_CHANNEL); kernels::BufferType::IN_OUT_CHANNEL);
ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"), 1e-2, 1e-2); ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"), 1e-1, 1e-2);
} }
TEST_F(BatchNormOpTest, NEONTest) { TEST_F(BatchNormOpTest, NEONTest) {
......
...@@ -253,7 +253,7 @@ void TestWXFormat(const index_t batch, ...@@ -253,7 +253,7 @@ void TestWXFormat(const index_t batch,
1e-1, 1e-1); 1e-1, 1e-1);
} else { } else {
ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"), ExpectTensorNear<float>(expected, *net.GetOutput("OPENCLOutput"),
1e-3, 1e-3); 1e-2, 1e-3);
} }
} }
} // namespace } // namespace
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册