TensorRT 10.8.0
|
网络定义中的 ReverseSequence 层。 更多...
#include <NvInfer.h>
公共成员函数 | |
void | setBatchAxis (int32_t batchAxis) noexcept |
设置批次轴。默认为 1。 更多... | |
int32_t | getBatchAxis () const noexcept |
返回批次轴。如果未设置批次轴,则返回 1。 更多... | |
void | setSequenceAxis (int32_t sequenceAxis) noexcept |
设置序列轴。默认为 0。 更多... | |
int32_t | getSequenceAxis () const noexcept |
返回序列轴。如果未设置序列轴,则返回 0。 更多... | |
![]() | |
LayerType | getType () const noexcept |
返回层的类型。 更多... | |
void | setName (char const *name) noexcept |
设置层的名称。 更多... | |
char const * | getName () const noexcept |
返回层的名称。 更多... | |
int32_t | getNbInputs () const noexcept |
获取层的输入数量。 更多... | |
ITensor * | getInput (int32_t index) const noexcept |
获取与给定索引对应的层输入。 更多... | |
int32_t | getNbOutputs () const noexcept |
获取层的输出数量。 更多... | |
ITensor * | getOutput (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 | ~IReverseSequenceLayer () noexcept=default |
![]() | |
virtual | ~ILayer () noexcept=default |
![]() | |
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 |
受保护属性 | |
apiv::VReverseSequenceLayer * | mImpl |
![]() | |
apiv::VLayer * | mLayer |
网络定义中的 ReverseSequence 层。
此层执行批次反转,它沿着 batchAxis 轴切分输入张量。对于第 i 个切片,此操作沿着 sequenceAxis 反转前 N 个元素(由 sequenceLens 中相应的第 i 个值指定),并保持剩余元素不变。输出张量将具有与输入张量相同的形状。
|
protectedvirtualdefaultnoexcept |
|
inlinenoexcept |
返回批次轴。如果未设置批次轴,则返回 1。
|
inlinenoexcept |
返回序列轴。如果未设置序列轴,则返回 0。
|
inlinenoexcept |
设置批次轴。默认为 1。
batchAxis 应介于零(包含)和输入秩(不包含)之间,并且与 sequenceAxis 不同。否则,将触发 ErrorCode::kINVALID_ARGUMENT。
|
inlinenoexcept |
设置序列轴。默认为 0。
sequenceAxis 应介于零(包含)和输入秩(不包含)之间,并且与 batchAxis 不同。否则,将触发 ErrorCode::kINVALID_ARGUMENT。
|
protected |
版权所有 © 2024 NVIDIA Corporation
隐私政策 | 管理我的隐私 | 请勿出售或分享我的数据 | 服务条款 | 辅助功能 | 公司政策 | 产品安全 | 联系我们