TensorRT 8.2.5
|
Generate an output tensor with specified mode. More...
#include <NvInfer.h>
Public Member Functions | |
void | setDimensions (Dims dimensions) noexcept |
Set the output tensor's dimensions. More... | |
Dims | getDimensions () const noexcept |
Get the output tensor's dimensions. More... | |
void | setOperation (FillOperation op) noexcept |
Set the fill operation for the layer. More... | |
FillOperation | getOperation () const noexcept |
Get the fill operation for the layer. More... | |
void | setAlpha (double alpha) noexcept |
Set the alpha parameter. More... | |
double | getAlpha () const noexcept |
Get the value of alpha parameter. More... | |
void | setBeta (double beta) noexcept |
Set the beta parameter. More... | |
double | getBeta () const noexcept |
Get the value of beta parameter. More... | |
void | setInput (int32_t index, ITensor &tensor) noexcept |
replace an input of this layer with a specific tensor. More... | |
![]() | |
LayerType | getType () const noexcept |
Return the type of a layer. More... | |
void | setName (const char *name) noexcept |
Set the name of a layer. More... | |
const char * | getName () const noexcept |
Return the name of a layer. More... | |
int32_t | getNbInputs () const noexcept |
Get the number of inputs of a layer. | |
ITensor * | getInput (int32_t index) const noexcept |
Get the layer input corresponding to the given index. More... | |
int32_t | getNbOutputs () const noexcept |
Get the number of outputs of a layer. | |
ITensor * | getOutput (int32_t index) const noexcept |
Get the layer output corresponding to the given index. More... | |
void | setInput (int32_t index, ITensor &tensor) noexcept |
Replace an input of this layer with a specific tensor. More... | |
void | setPrecision (DataType dataType) noexcept |
Set the computational precision of this layer. More... | |
DataType | getPrecision () const noexcept |
get the computational precision of this layer More... | |
bool | precisionIsSet () const noexcept |
whether the computational precision has been set for this layer More... | |
void | resetPrecision () noexcept |
reset the computational precision for this layer More... | |
void | setOutputType (int32_t index, DataType dataType) noexcept |
Set the output type of this layer. More... | |
DataType | getOutputType (int32_t index) const noexcept |
get the output type of this layer More... | |
bool | outputTypeIsSet (int32_t index) const noexcept |
whether the output type has been set for this layer More... | |
void | resetOutputType (int32_t index) noexcept |
reset the output type for this layer More... | |
Protected Attributes | |
apiv::VFillLayer * | mImpl |
![]() | |
apiv::VLayer * | mLayer |
Additional Inherited Members | |
![]() | |
INoCopy (const INoCopy &other)=delete | |
INoCopy & | operator= (const INoCopy &other)=delete |
INoCopy (INoCopy &&other)=delete | |
INoCopy & | operator= (INoCopy &&other)=delete |
Generate an output tensor with specified mode.
The fill layer has two variants, static and dynamic. Static fill specifies its parameters at layer creation time via Dims and the get/set accessor functions of the IFillLayer. Dynamic fill specifies one or more of its parameters as ITensors, by using ILayer::setTensor to add a corresponding input. The corresponding static parameter is used if an input is missing or null.
The shape of the output is specified by the parameter Dimension
, or if non-null and present, the first input, which must be a 1D Int32 shape tensor. Thus an application can determine if the IFillLayer has a dynamic output shape based on whether it has a non-null first input.
Alpha and Beta are treated differently based on the Fill Operation specified. See details in IFillLayer::setAlpha(), IFillLayer::setBeta(), and IFillLayer::setInput().
A fill layer can produce a shape tensor if the following restrictions are met:
|
inlinenoexcept |
Get the value of alpha parameter.
If the second input is present and non-null, this function returns -1.0.
|
inlinenoexcept |
Get the value of beta parameter.
If the third input is present and non-null, this function returns -1.0.
|
inlinenoexcept |
Get the output tensor's dimensions.
If the first input is present and non-null, this function returns a Dims with nbDims = -1.
|
inlinenoexcept |
Get the fill operation for the layer.
|
inlinenoexcept |
Set the alpha parameter.
alpha | has different meanings for each operator: |
Operation | Usage kLINSPACE | the start value, defaults to 0.0; kRANDOMUNIFORM | the minimum value, defaults to 0.0;
If a second input had been used to create this layer, that input is reset to null by this method.
|
inlinenoexcept |
Set the beta parameter.
beta | has different meanings for each operator: |
Operation | Usage kLINSPACE | the delta value, defaults to 1.0; kRANDOMUNIFORM | the maximal value, defaults to 1.0;
If a third input had been used to create this layer, that input is reset to null by this method.
|
inlinenoexcept |
Set the output tensor's dimensions.
dimensions | The output tensor's dimensions. |
If the first input had been used to create this layer, that input is reset to null by this method.
|
inlinenoexcept |
replace an input of this layer with a specific tensor.
index | the index of the input to set. |
tensor | the new input tensor |
Indices for kLINSPACE are described as:
Indices for kRANDOM_UNIFORM are described as:
Using the corresponding setter resets the input to null.
If either inputs 1 or 2, is non-null, then both must be non-null and have the same data type.
If this function is called for an index greater or equal to getNbInputs(), then afterwards getNbInputs() returns index + 1, and any missing intervening inputs are set to null.
|
inlinenoexcept |
Set the fill operation for the layer.
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