Skip to content

Commit

Permalink
trtexec: Use getNbOutputs when computing outputs
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bernlöhr <[email protected]>
  • Loading branch information
janbernloehr authored and nvpohanh committed Jun 8, 2023
1 parent f82a322 commit 6e5bebd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion samples/common/sampleEngines.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void setTensorScalesFromCalibration(nvinfer1::INetworkDefinition& network, std::
input->setDynamicRange(-127 * calibScale, 127 * calibScale);
}
}
bool const broadcastOutputFormats = broadcastIOFormats(outputFormats, network.getNbInputs());
bool const broadcastOutputFormats = broadcastIOFormats(outputFormats, network.getNbOutputs());
for (int32_t i = 0, n = network.getNbOutputs(); i < n; ++i)
{
int32_t formatIdx = broadcastOutputFormats ? 0 : i;
Expand Down

0 comments on commit 6e5bebd

Please sign in to comment.