提交 4f71a3b1 编写于 作者: N nhzlx

fix a bug

上级 c8adfb34
...@@ -162,7 +162,8 @@ class TRTConvertValidation { ...@@ -162,7 +162,8 @@ class TRTConvertValidation {
size_t fluid_out_size = fluid_out.size(); size_t fluid_out_size = fluid_out.size();
if (if_add_batch_ == true) { if (if_add_batch_ == true) {
fluid_out_size = batch_size * (tensor->dims().size() / max_batch_size_); fluid_out_size =
batch_size * (framework::product(tensor->dims()) / max_batch_size_);
} }
// Compare two output // Compare two output
ASSERT_FALSE(fluid_out.empty()); ASSERT_FALSE(fluid_out.empty());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册