Skip to content

Commit e1a3c47

Browse files
author
Wish
committed
fix name
1 parent c938826 commit e1a3c47

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/tensorRT/builder/trt_builder.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -624,13 +624,13 @@ namespace TRT {
624624
}
625625

626626
for(int i = 0; i < net_num_output; ++i){
627-
auto input = network->getOutput(i);
628-
auto input_dims = input->getDimensions();
629-
input_dims.d[0] = 1;
630-
profile->setDimensions(input->getName(), nvinfer1::OptProfileSelector::kMIN, input_dims);
631-
profile->setDimensions(input->getName(), nvinfer1::OptProfileSelector::kOPT, input_dims);
632-
input_dims.d[0] = maxBatchSize;
633-
profile->setDimensions(input->getName(), nvinfer1::OptProfileSelector::kMAX, input_dims);
627+
auto output = network->getOutput(i);
628+
auto output_dims = output->getDimensions();
629+
output_dims.d[0] = 1;
630+
profile->setDimensions(output->getName(), nvinfer1::OptProfileSelector::kMIN, output_dims);
631+
profile->setDimensions(output->getName(), nvinfer1::OptProfileSelector::kOPT, output_dims);
632+
output_dims.d[0] = maxBatchSize;
633+
profile->setDimensions(output->getName(), nvinfer1::OptProfileSelector::kMAX, output_dims);
634634
}
635635
config->addOptimizationProfile(profile);
636636

0 commit comments

Comments
 (0)