TensorRT 10.8.0
nvinfer1::IRecurrenceLayer 类参考

网络定义中的循环层。 更多...

#include <NvInfer.h>

nvinfer1::IRecurrenceLayer 的继承关系图
nvinfer1::ILoopBoundaryLayer nvinfer1::ILayer nvinfer1::INoCopy

公共成员函数

void setInput (int32_t index, ITensor &tensor) noexcept
 追加或替换此层的输入为特定的张量。 更多...
 
- 继承自 nvinfer1::ILoopBoundaryLayer 的公共成员函数
ILoopgetLoop () const noexcept
 获取指向与此边界层关联的 ILoop 的指针。 更多...
 
- 继承自 nvinfer1::ILayer 的公共成员函数
LayerType getType () const noexcept
 返回层的类型。 更多...
 
void setName (char const *name) noexcept
 设置层的名称。 更多...
 
char const * getName () const noexcept
 返回层的名称。 更多...
 
int32_t getNbInputs () const noexcept
 获取层的输入数量。 更多...
 
ITensorgetInput (int32_t index) const noexcept
 获取与给定索引对应的层输入。 更多...
 
int32_t getNbOutputs () const noexcept
 获取层的输出数量。 更多...
 
ITensorgetOutput (int32_t index) const noexcept
 获取与给定索引对应的层输出。 更多...
 
void setInput (int32_t index, ITensor &tensor) noexcept
 用特定的张量替换此层的输入。 更多...
 
void setPrecision (DataType dataType) noexcept
 在弱类型网络中,设置此层的首选或必需的计算精度。 更多...
 
DataType getPrecision () const noexcept
 获取此层的计算精度 更多...
 
bool precisionIsSet () const noexcept
 是否已为此层设置计算精度 更多...
 
void resetPrecision () noexcept
 重置此层的计算精度 更多...
 
void setOutputType (int32_t index, DataType dataType) noexcept
 在弱类型网络中,设置此层的输出类型。 更多...
 
DataType getOutputType (int32_t index) const noexcept
 获取此层的输出类型 更多...
 
bool outputTypeIsSet (int32_t index) const noexcept
 是否已为此层设置输出类型 更多...
 
void resetOutputType (int32_t index) noexcept
 重置此层的输出类型 更多...
 
void setMetadata (char const *metadata) noexcept
 设置此层的元数据。 更多...
 
char const * getMetadata () const noexcept
 获取层的元数据。 更多...
 

保护成员函数

virtual ~IRecurrenceLayer () noexcept=default
 
- 继承自 nvinfer1::ILoopBoundaryLayer 的保护成员函数
virtual ~ILoopBoundaryLayer () noexcept=default
 
- 继承自 nvinfer1::ILayer 的保护成员函数
virtual ~ILayer () noexcept=default
 
- 继承自 nvinfer1::INoCopy 的保护成员函数
 INoCopy ()=default
 
virtual ~INoCopy ()=default
 
 INoCopy (INoCopy const &other)=delete
 
INoCopyoperator= (INoCopy const &other)=delete
 
 INoCopy (INoCopy &&other)=delete
 
INoCopyoperator= (INoCopy &&other)=delete
 

保护属性

apiv::VRecurrenceLayer * mImpl
 
- 继承自 nvinfer1::ILoopBoundaryLayer 的保护属性
apiv::VLoopBoundaryLayer * mBoundary
 
- 继承自 nvinfer1::ILayer 的保护属性
apiv::VLayer * mLayer
 

详细描述

网络定义中的循环层。

循环层允许循环迭代从前一次迭代中计算的值计算结果。

构造函数 & 析构函数文档

◆ ~IRecurrenceLayer()

virtual nvinfer1::IRecurrenceLayer::~IRecurrenceLayer ( )
protectedvirtualdefaultnoexcept

成员函数文档

◆ setInput()

void nvinfer1::ILayer::setInput ( int32_t  index,
ITensor tensor 
)
inlinenoexcept

追加或替换此层的输入为特定的张量。

参数
index要修改的输入的索引。
tensor新的输入张量。设置给定索引的输入张量。

对于循环层,值 0 和 1 是有效的。索引如下:

  • 0:输出张量的初始值。该值必须来自循环外部。
  • 1:输出张量的下一个值。该值通常来自循环内部,并且必须与输入 0 具有相同的维度。

如果使用值 1 调用此函数,则函数 getNbInputs() 的返回值将从 1 变为 2。

成员数据文档

◆ mImpl

apiv::VRecurrenceLayer* nvinfer1::IRecurrenceLayer::mImpl
protected

此类文档从以下文件生成

  版权所有 © 2024 NVIDIA Corporation
  隐私政策 | 管理我的隐私 | 请勿出售或分享我的数据 | 服务条款 | 辅助功能 | 公司政策 | 产品安全 | 联系方式