Skip to content

Commit 4f71a3b

Browse files
committed
fix a bug
1 parent c8adfb3 commit 4f71a3b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

paddle/fluid/inference/tensorrt/convert/ut_helper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,8 @@ class TRTConvertValidation {
162162

163163
size_t fluid_out_size = fluid_out.size();
164164
if (if_add_batch_ == true) {
165-
fluid_out_size = batch_size * (tensor->dims().size() / max_batch_size_);
165+
fluid_out_size =
166+
batch_size * (framework::product(tensor->dims()) / max_batch_size_);
166167
}
167168
// Compare two output
168169
ASSERT_FALSE(fluid_out.empty());

0 commit comments

Comments
 (0)