|
TensorRT 11.0.0
|
Base class for all layer classes in a network definition. More...
#include <NvInfer.h>
Public Member Functions | |
| LayerType | getType () const noexcept |
| Return the type of a layer. More... | |
| void | setName (char const *name) noexcept |
| Set the name of a layer. More... | |
| char const * | getName () const noexcept |
| Return the name of a layer. More... | |
| int32_t | getNbInputs () const noexcept |
| Get the number of inputs of a layer. More... | |
| 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. More... | |
| 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... | |
| DataType | getOutputType (int32_t index) const noexcept |
| get the output type of this layer More... | |
| void | setMetadata (char const *metadata) noexcept |
| Set the metadata for this layer. More... | |
| char const * | getMetadata () const noexcept |
| Get the metadata of the layer. More... | |
| bool | setNbRanks (int32_t nbRanks) noexcept |
| Set the number of ranks for multi-device execution. More... | |
| int32_t | getNbRanks () const noexcept |
| Get the number of ranks for multi-device execution. More... | |
Protected Member Functions | |
| virtual | ~ILayer () noexcept=0 |
Protected Member Functions inherited from nvinfer1::INoCopy | |
| INoCopy ()=default | |
| virtual | ~INoCopy ()=default |
| INoCopy (INoCopy const &other)=delete | |
| INoCopy & | operator= (INoCopy const &other)=delete |
| INoCopy (INoCopy &&other)=delete | |
| INoCopy & | operator= (INoCopy &&other)=delete |
Protected Attributes | |
| apiv::VLayer * | mLayer |
Base class for all layer classes in a network definition.
|
inlineprotectedpure virtualdefaultnoexcept |
|
inlinenoexcept |
Get the layer input corresponding to the given index.
| index | The index of the input tensor. |
|
inlinenoexcept |
Get the metadata of the layer.
|
inlinenoexcept |
Return the name of a layer.
|
inlinenoexcept |
Get the number of inputs of a layer.
|
inlinenoexcept |
Get the number of outputs of a layer.
|
inlinenoexcept |
Get the number of ranks for multi-device execution.
|
inlinenoexcept |
Get the layer output corresponding to the given index.
|
inlinenoexcept |
get the output type of this layer
| index | the index of the output |
|
inlinenoexcept |
Return the type of a layer.
|
inlinenoexcept |
Replace an input of this layer with a specific tensor.
| index | the index of the input to modify. |
| tensor | the new input tensor |
Except for IFillLayer, ILoopOutputLayer, INMSLayer, IResizeLayer, IShuffleLayer, and ISliceLayer, this method cannot change the number of inputs to a layer. The index argument must be less than the value of getNbInputs().
See comments for overloads of setInput() for layers with special behavior.
|
inlinenoexcept |
Set the metadata for this layer.
The metadata is emitted in the JSON returned by IEngineInspector with ProfilingVerbosity set to kDETAILED.
| metadata | The per-layer metadata. |
|
inlinenoexcept |
Set the name of a layer.
This method copies the name string.
|
inlinenoexcept |
Set the number of ranks for multi-device execution.
Setting nbRanks > 1 is only allowed for specific layer types that support multi-device execution:
For attention layers, use IAttention::setNbRanks() instead. For all other layer types, nbRanks must be 1.
| nbRanks | The number of ranks for multi-device execution. Must be >= 1. |
|
protected |
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