|
TensorRT 11.3.0
|
An array of weights used as a layer parameter. More...
#include <NvInferRuntime.h>
Public Attributes | |
| DataType | type |
| The type of the weights. More... | |
| void const * | values |
| The weight values, in a contiguous array. More... | |
| int64_t | count |
| The number of weights in the array. More... | |
An array of weights used as a layer parameter.
When using the DLA, the cumulative size of all Weights used in a network must be less than 512MB in size. If the build option kGPU_FALLBACK is specified, then multiple DLA sub-networks may be generated from the single original network.
The weights are held by reference until the engine has been built. Therefore the data referenced by values field should be preserved until the build is complete.
The term "empty weights" refers to Weights with weight coefficients ( count == 0 and values == nullptr).
A positive count with a null values pointer denotes a build-time weight placeholder when supplied to a supported INetworkDefinition layer creation method. This is supported for IConvolutionLayer/IDeconvolutionLayer kernel or bias weights and IScaleLayer shift or scale weights only when calling IBuilder::buildSerializedNetwork() with BuilderFlag::kREFIT_INDIVIDUAL and BuilderFlag::kSTRIP_PLAN. Such weights are implicitly refittable and must be named using the canonical Weights descriptor returned by the corresponding layer getter. A placeholder descriptor is not readable storage: count records the eventual number of values, but the null values pointer must not be dereferenced. TensorRT supplies placeholder storage during the build; the actual values must be provided through refit before inference. The canonical descriptor is an opaque identity local to its INetworkDefinition. Its values pointer must not be dereferenced or used as layer input; the descriptor may only identify the existing weights in its originating network, such as in INetworkDefinition::setWeightsName().
| int64_t nvinfer1::Weights::count |
The number of weights in the array.
| DataType nvinfer1::Weights::type |
The type of the weights.
| void const* nvinfer1::Weights::values |
The weight values, in a contiguous array.
Copyright © 2024 NVIDIA Corporation
Privacy Policy |
Manage My Privacy |
Do Not Sell or Share My Data |
Terms of Service |
Accessibility |
Corporate Policies |
Product Security |
Contact