The SampleGoogleNet class implements the GoogleNet sample.
More...
The SampleGoogleNet class implements the GoogleNet sample.
It creates the network using a caffe model
◆ SampleUniquePtr
◆ SampleGoogleNet()
◆ build()
bool SampleGoogleNet::build |
( |
| ) |
|
Builds the network engine.
Creates the network, configures the builder and creates the network engine.
This function creates the GoogleNet network by parsing the caffe model and builds the engine that will be used to run GoogleNet (mEngine)
- Returns
- Returns true if the engine was created successfully and false otherwise
◆ infer()
bool SampleGoogleNet::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.
◆ teardown()
bool SampleGoogleNet::teardown |
( |
| ) |
|
Used to clean up any state created in the sample class.
Clean up the libprotobuf files as the parsing is complete
- Note
- It is not safe to use any other part of the protocol buffers library after ShutdownProtobufLibrary() has been called.
◆ constructNetwork()
Parses a Caffe model for GoogleNet and creates a TensorRT network.
Uses a caffe parser to create the googlenet Network and marks the output layers.
- Parameters
-
network | Pointer to the network that will be populated with the googlenet network |
builder | Pointer to the engine builder |
◆ mParams
◆ mEngine
The TensorRT engine used to run the network.
The documentation for this class was generated from the following file: