From c6a5c4b0c070711924d9a69471c3ef66b7b3d07d Mon Sep 17 00:00:00 2001 From: nhzlx Date: Tue, 21 Aug 2018 02:53:00 +0000 Subject: [PATCH] add comments for execute in ut_helper --- paddle/fluid/inference/tensorrt/convert/ut_helper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/inference/tensorrt/convert/ut_helper.h b/paddle/fluid/inference/tensorrt/convert/ut_helper.h index 833f35167b9..0a6f171fc40 100644 --- a/paddle/fluid/inference/tensorrt/convert/ut_helper.h +++ b/paddle/fluid/inference/tensorrt/convert/ut_helper.h @@ -163,6 +163,9 @@ class TRTConvertValidation { } } + // We use the set 'neglected_output' here, because some Ops like batch norm, + // the outputs specified in the op des are only used during training, + // so we should neglect those output during inference. void Execute(int batch_size, std::unordered_set neglected_output = {}) { // Execute Fluid Op @@ -177,9 +180,6 @@ class TRTConvertValidation { ASSERT_FALSE(op_desc_->OutputArgumentNames().empty()); const size_t output_space_size = 3000; for (const auto& output : op_desc_->OutputArgumentNames()) { - // Some Ops like batch norm, the output specified - // in the op des is only used during training, so we should - // neglect those ouput during inference. if (neglected_output.count(output)) continue; std::vector fluid_out; std::vector trt_out(output_space_size); -- GitLab