TensorRT 10.8.0
nvinfer1::IGridSampleLayer 类参考

网络定义中的 GridSample 层。 更多...

#include <NvInfer.h>

nvinfer1::IGridSampleLayer 的继承关系图
nvinfer1::ILayer nvinfer1::INoCopy

公共成员函数

void setInterpolationMode (InterpolationMode mode) noexcept
 设置网格采样插值模式。 更多...
 
InterpolationMode getInterpolationMode () const noexcept
 获取网格采样插值模式。 更多...
 
void setAlignCorners (bool alignCorners) noexcept
 设置对齐角点模式。 更多...
 
bool getAlignCorners () const noexcept
 获取对齐角点模式。 更多...
 
bool setSampleMode (SampleMode mode) noexcept
 设置采样模式。 更多...
 
SampleMode getSampleMode () const noexcept
 获取采样模式。 更多...
 
- 继承自 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 ~IGridSampleLayer () 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::VGridSampleLayer * mImpl
 
- 继承自 nvinfer1::ILayer 的保护属性
apiv::VLayer * mLayer
 

详细描述

网络定义中的 GridSample 层。

此层使用输入张量和网格张量来生成插值输出张量。输入张量和网格张量必须是秩为 4 的形状张量。唯一支持的 SampleMode 值是 SampleMode::kCLAMPSampleMode::kFILLSampleMode::kREFLECT

警告
请勿从此类继承,因为这样做会破坏 API 和 ABI 的向前兼容性。

构造函数 & 析构函数文档

◆ ~IGridSampleLayer()

virtual nvinfer1::IGridSampleLayer::~IGridSampleLayer ( )
protectedvirtualdefaultnoexcept

成员函数文档

◆ getAlignCorners()

bool nvinfer1::IGridSampleLayer::getAlignCorners ( ) const
inlinenoexcept

获取对齐角点模式。

参见
setAlignCorners()
返回值
setAlignCorners() 指定的值,否则为 false。

◆ getInterpolationMode()

InterpolationMode nvinfer1::IGridSampleLayer::getInterpolationMode ( ) const
inlinenoexcept

获取网格采样插值模式。

参见
setInterpolationMode()
返回值
由 setInterpolationMode 指定的值,否则为 InterpolationMode::kLINEAR

◆ getSampleMode()

SampleMode nvinfer1::IGridSampleLayer::getSampleMode ( ) const
inlinenoexcept

获取采样模式。

参见
setSampleMode()
返回值
成功调用 setSampleMode() 指定的值,否则为 SampleMode::kFILL

◆ setAlignCorners()

void nvinfer1::IGridSampleLayer::setAlignCorners ( bool  alignCorners)
inlinenoexcept

设置对齐角点模式。

参见
getAlignCorners()

◆ setInterpolationMode()

void nvinfer1::IGridSampleLayer::setInterpolationMode ( InterpolationMode  mode)
inlinenoexcept

设置网格采样插值模式。

参见
getInterpolationMode()

◆ setSampleMode()

bool nvinfer1::IGridSampleLayer::setSampleMode ( SampleMode  mode)
inlinenoexcept

设置采样模式。

参见
getSampleMode()
返回值
如果层的采样模式设置为 mode,则返回 true,否则返回 false。

成员数据文档

◆ mImpl

apiv::VGridSampleLayer* nvinfer1::IGridSampleLayer::mImpl
protected

此类文档从以下文件生成

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