Skip to content

Commit 6e5bebd

Browse files
janbernloehrnvpohanh
authored andcommitted
trtexec: Use getNbOutputs when computing outputs
Signed-off-by: Jan Bernlöhr <jan@bernloehrs.de>
1 parent f82a322 commit 6e5bebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/common/sampleEngines.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ void setTensorScalesFromCalibration(nvinfer1::INetworkDefinition& network, std::
206206
input->setDynamicRange(-127 * calibScale, 127 * calibScale);
207207
}
208208
}
209-
bool const broadcastOutputFormats = broadcastIOFormats(outputFormats, network.getNbInputs());
209+
bool const broadcastOutputFormats = broadcastIOFormats(outputFormats, network.getNbOutputs());
210210
for (int32_t i = 0, n = network.getNbOutputs(); i < n; ++i)
211211
{
212212
int32_t formatIdx = broadcastOutputFormats ? 0 : i;

0 commit comments

Comments
 (0)