|
TensorRT 10.8.0
|
表示 TopK 缩减的层。更多...
#include <NvInfer.h>
公共成员函数 | |
| void | setOperation (TopKOperation op) noexcept |
| 设置层的操作。更多... | |
| TopKOperation | getOperation () const noexcept |
| 获取层的操作。更多... | |
| void | setK (int32_t k) noexcept |
| 设置层的静态 k 值。更多... | |
| int32_t | getK () const noexcept |
| 获取层的 k 值。更多... | |
| void | setReduceAxes (uint32_t reduceAxes) noexcept |
| 设置层要缩减的轴。更多... | |
| uint32_t | getReduceAxes () const noexcept |
| 获取层要缩减的轴。更多... | |
| void | setInput (int32_t index, ITensor &tensor) noexcept |
| 为此层附加或替换特定的输入张量。更多... | |
继承自 nvinfer1::ILayer 的公共成员函数 | |
| 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 | ~ITopKLayer () noexcept=default |
继承自 nvinfer1::ILayer 的受保护成员函数 | |
| virtual | ~ILayer () noexcept=default |
继承自 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 |
受保护属性 | |
| apiv::VTopKLayer * | mImpl |
继承自 nvinfer1::ILayer 的受保护属性 | |
| apiv::VLayer * | mLayer |
表示 TopK 缩减的层。
此层可以接受静态和动态 k 值。静态 k 值可以通过 addTopK() API 函数设置,或在使用层创建后的 getK() 和 setK() 函数访问。对于动态 k 值,请使用 setInput() 方法传入 k 值作为索引为 1 的张量,这将覆盖计算中的静态 k 值。
|
protectedvirtualdefaultnoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
获取层的操作。
|
inlinenoexcept |
获取层要缩减的轴。
|
inlinenoexcept |
为此层附加或替换特定的输入张量。
| index | 要修改的输入的索引。 |
| tensor | 新的输入张量。 |
对于 TopK 层,有效值为 0-1。索引如下:
|
inlinenoexcept |
|
inlinenoexcept |
设置层的操作。
|
inlinenoexcept |
设置层要缩减的轴。
|
protected |
版权所有 © 2024 NVIDIA Corporation
隐私政策 | 管理我的隐私 | 请勿出售或分享我的数据 | 服务条款 | 无障碍功能 | 公司政策 | 产品安全 | 联系我们