TensorRT
5.1.5.0
|
Updates weights in an engine. More...
#include <NvInfer.h>
Public Member Functions | |
virtual bool | setWeights (const char *layerName, WeightsRole role, Weights weights)=0 |
Specify new weights for a layer of given name. Returns true on success, or false if new weights are rejected. Possible reasons for rejection are: More... | |
virtual bool | refitCudaEngine ()=0 |
Updates associated engine. Return true if successful. More... | |
virtual int | getMissing (int size, const char **layerNames, WeightsRole *roles)=0 |
Get description of missing weights. More... | |
virtual int | getAll (int size, const char **layerNames, WeightsRole *roles)=0 |
Get description of all weights that could be refit. More... | |
virtual void | destroy ()=0 |
Updates weights in an engine.
|
pure virtual |
Get description of all weights that could be refit.
size | The number of items that can be safely written to a non-null layerNames or roles. |
layerNames | Where to write the layer names. |
roles | Where to write the weights roles. |
If layerNames!=nullptr, each written pointer points to a string owned by the engine being refitted, and becomes invalid when the engine is destroyed.
|
pure virtual |
Get description of missing weights.
For example, if some Weights have been set, but the engine was optimized in a way that combines weights, any unsupplied Weights in the combination are considered missing.
size | The number of items that can be safely written to a non-null layerNames or roles. |
layerNames | Where to write the layer names. |
roles | Where to write the weights roles. |
If layerNames!=nullptr, each written pointer points to a string owned by the engine being refitted, and becomes invalid when the engine is destroyed.
|
pure virtual |
Updates associated engine. Return true if successful.
Failure occurs if getMissing() != 0 before the call.
|
pure virtual |
Specify new weights for a layer of given name. Returns true on success, or false if new weights are rejected. Possible reasons for rejection are:
Modifying the weights before method refit() completes will result in undefined behavior.