提交 713e8648 编写于 作者: T tensor-tang

bugfix ditu test

上级 63b38ca4
...@@ -34,7 +34,7 @@ namespace paddle { ...@@ -34,7 +34,7 @@ namespace paddle {
namespace inference { namespace inference {
namespace analysis { namespace analysis {
using namespace framework; using namespace framework; // NOLINT
TEST(Analyzer, analysis_without_tensorrt) { TEST(Analyzer, analysis_without_tensorrt) {
FLAGS_IA_enable_tensorrt_subgraph_engine = false; FLAGS_IA_enable_tensorrt_subgraph_engine = false;
...@@ -312,8 +312,8 @@ void TestDituRNNPrediction(const std::string &model_path, ...@@ -312,8 +312,8 @@ void TestDituRNNPrediction(const std::string &model_path,
PADDLE_ENFORCE_GT(size, 0); PADDLE_ENFORCE_GT(size, 0);
float *data = static_cast<float *>(out.data.data()); float *data = static_cast<float *>(out.data.data());
float *base_data = static_cast<float *>(base_out.data.data()); float *base_data = static_cast<float *>(base_out.data.data());
for (size_t i = 0; i < size; i++) { for (size_t j = 0; j < size; j++) {
EXPECT_NEAR(data[i], base_data[i], 1e-3); EXPECT_NEAR(data[j], base_data[j], 1e-3);
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册