Class TensorRtIfConditional
- Namespace
- JYPPX.TensorRtSharp
- Assembly
- JYPPX.TensorRtSharp.dll
Represents a TensorRT if-conditional definition owned by a network. 表示由 network 持有生命周期的 TensorRT if-conditional 定义。
public sealed class TensorRtIfConditional : IDisposable
- Inheritance
-
TensorRtIfConditional
- Implements
- Inherited Members
Properties
Line
Gets the TensorRT API line used by this conditional. 获取此 conditional 使用的 TensorRT API 系列。
public TensorRtApiLine Line { get; }
Property Value
Name
Gets or sets the TensorRT conditional name. 获取或设置 TensorRT conditional 名称。
public string Name { get; set; }
Property Value
Methods
AddInput(TensorRtTensor)
Adds a conditional input boundary layer. 添加 conditional input 边界层。
public TensorRtLayer AddInput(TensorRtTensor input)
Parameters
inputTensorRtTensorInput tensor shared with conditional branches. / 与 conditional 分支共享的输入张量。
Returns
- TensorRtLayer
The network-owned conditional input layer. / 由 network 持有生命周期的 conditional input 层。
AddOutput(TensorRtTensor, TensorRtTensor)
Adds a conditional output boundary layer. 添加 conditional output 边界层。
public TensorRtLayer AddOutput(TensorRtTensor trueOutput, TensorRtTensor falseOutput)
Parameters
trueOutputTensorRtTensorOutput tensor from the true branch. / true 分支输出张量。
falseOutputTensorRtTensorOutput tensor from the false branch. / false 分支输出张量。
Returns
- TensorRtLayer
The network-owned conditional output layer. / 由 network 持有生命周期的 conditional output 层。
Dispose()
Releases the managed bridge reference for this network-owned conditional. 释放此 network-owned conditional 的托管桥接引用。
public void Dispose()
SetCondition(TensorRtTensor)
Sets the boolean condition tensor for this conditional. 设置此 conditional 的布尔条件张量。
public TensorRtLayer SetCondition(TensorRtTensor condition)
Parameters
conditionTensorRtTensorScalar boolean condition tensor. / 标量布尔条件张量。
Returns
- TensorRtLayer
The network-owned condition layer. / 由 network 持有生命周期的 condition 层。