The SampleOnnxMnistCoordConvAC class implements the ONNX MNIST sample.
More...
The SampleOnnxMnistCoordConvAC class implements the ONNX MNIST sample.
It creates the network using an ONNX model
◆ SampleUniquePtr
◆ SampleOnnxMnistCoordConvAC()
◆ build()
bool SampleOnnxMnistCoordConvAC::build |
( |
| ) |
|
Function builds the network engine.
Creates the network, configures the builder and creates the network engine.
This function creates the Onnx MNIST network by parsing the Onnx model and builds the engine that will be used to run MNIST (mEngine)
- Returns
- Returns true if the engine was created successfully and false otherwise
◆ infer()
bool SampleOnnxMnistCoordConvAC::infer |
( |
| ) |
|
Runs the TensorRT inference engine for this sample.
This function is the main execution function of the sample. It allocates the buffer, sets inputs and executes the engine.
◆ constructNetwork()
Parses an ONNX model for MNIST and creates a TensorRT network.
Uses a ONNX parser to create the Onnx MNIST Network and marks the output layers.
- Parameters
-
network | Pointer to the network that will be populated with the Onnx MNIST network |
builder | Pointer to the engine builder |
◆ processInput()
Reads the input and stores the result in a managed buffer.
◆ verifyOutput()
Classifies digits and verify result.
- Returns
- whether the classification output matches expectations
◆ mParams
The parameters for the sample.
◆ mInputDims
The dimensions of the input to the network.
◆ mOutputDims
The dimensions of the output to the network.
◆ mNumber
int SampleOnnxMnistCoordConvAC::mNumber {0} |
|
private |
◆ mEngine
The TensorRT engine used to run the network.
The documentation for this class was generated from the following file:
- sampleOnnxMnistCoordConvAC.cpp