An interface designed to refit weights from an ONNX model.
More...
#include <NvOnnxParser.h>
|
virtual bool | refitFromBytes (void const *serializedOnnxModel, size_t serializedOnnxModelSize, char const *modelPath=nullptr) noexcept=0 |
| Load a serialized ONNX model from memory and perform weight refit. More...
|
|
virtual bool | refitFromFile (char const *onnxModelFile) noexcept=0 |
| Load and parse a ONNX model from disk and perform weight refit. More...
|
|
virtual int32_t | getNbErrors () const noexcept=0 |
| Get the number of errors that occurred during prior calls to refitFromBytes or refitFromFile . More...
|
|
virtual IParserError const * | getError (int32_t index) const noexcept=0 |
| Get an error that occurred during prior calls to refitFromBytes or refitFromFile . More...
|
|
virtual void | clearErrors ()=0 |
| Clear errors from prior calls to refitFromBytes or refitFromFile . More...
|
|
virtual | ~IParserRefitter () noexcept=default |
|
An interface designed to refit weights from an ONNX model.
◆ ~IParserRefitter()
virtual nvonnxparser::IParserRefitter::~IParserRefitter |
( |
| ) |
|
|
virtualdefaultnoexcept |
◆ clearErrors()
virtual void nvonnxparser::IParserRefitter::clearErrors |
( |
| ) |
|
|
pure virtual |
◆ getError()
virtual IParserError const * nvonnxparser::IParserRefitter::getError |
( |
int32_t |
index | ) |
const |
|
pure virtualnoexcept |
◆ getNbErrors()
virtual int32_t nvonnxparser::IParserRefitter::getNbErrors |
( |
| ) |
const |
|
pure virtualnoexcept |
Get the number of errors that occurred during prior calls to refitFromBytes
or refitFromFile
.
- See also
- getError() IParserError
◆ refitFromBytes()
virtual bool nvonnxparser::IParserRefitter::refitFromBytes |
( |
void const * |
serializedOnnxModel, |
|
|
size_t |
serializedOnnxModelSize, |
|
|
char const * |
modelPath = nullptr |
|
) |
| |
|
pure virtualnoexcept |
Load a serialized ONNX model from memory and perform weight refit.
- Parameters
-
serializedOnnxModel | Pointer to the serialized ONNX model |
serializedOnnxModelSize | Size of the serialized ONNX model in bytes |
modelPath | Absolute path to the model file for loading external weights if required |
- Returns
- true if all the weights in the engine were refit successfully.
The serialized ONNX model must be identical to the one used to generate the engine that will be refit.
◆ refitFromFile()
virtual bool nvonnxparser::IParserRefitter::refitFromFile |
( |
char const * |
onnxModelFile | ) |
|
|
pure virtualnoexcept |
Load and parse a ONNX model from disk and perform weight refit.
- Parameters
-
onnxModelFile | Path to the ONNX model to load from disk. |
- Returns
- true if the model was loaded successfully, and if all the weights in the engine were refit successfully.
The provided ONNX model must be identical to the one used to generate the engine that will be refit.
The documentation for this class was generated from the following file: