File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
paddle/fluid/inference/tensorrt/convert Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -163,6 +163,9 @@ class TRTConvertValidation {
163
163
}
164
164
}
165
165
166
+ // We use the set 'neglected_output' here, because some Ops like batch norm,
167
+ // the outputs specified in the op des are only used during training,
168
+ // so we should neglect those output during inference.
166
169
void Execute (int batch_size,
167
170
std::unordered_set<std::string> neglected_output = {}) {
168
171
// Execute Fluid Op
@@ -177,9 +180,6 @@ class TRTConvertValidation {
177
180
ASSERT_FALSE (op_desc_->OutputArgumentNames ().empty ());
178
181
const size_t output_space_size = 3000 ;
179
182
for (const auto & output : op_desc_->OutputArgumentNames ()) {
180
- // Some Ops like batch norm, the output specified
181
- // in the op des is only used during training, so we should
182
- // neglect those ouput during inference.
183
183
if (neglected_output.count (output)) continue ;
184
184
std::vector<float > fluid_out;
185
185
std::vector<float > trt_out (output_space_size);
You can’t perform that action at this time.
0 commit comments