How a layer uses particular Weights. The power weights of an IScaleLayer are omitted. Refitting those is not supported.
SHIFT : Shift part of
SCALE : Scale part of
CONSTANT : Weights for
ANY : Any other weights role.
- class tensorrt.Weights(*args, **kwargs)
An array of weights used as a layer parameter. The weights are held by reference until the engine has been built - deep copies are not made automatically.
DataTypeThe type of the weights.
intThe number of weights in the array.
intTotal bytes consumed by the elements of the weights buffer.
__init__(self: tensorrt.tensorrt.Weights, type: tensorrt.tensorrt.DataType = <DataType.FLOAT: 0>) -> None
Initializes an empty (0-length) Weights object with the specified type.
A type to initialize the weights with. Default:
__init__(self: tensorrt.tensorrt.Weights, a: numpy.ndarray) -> None
A numpy array whose values to use. No deep copies are made.