Class TensorRtLoop
- Namespace
- JYPPX.TensorRtSharp
- Assembly
- JYPPX.TensorRtSharp.dll
Represents a TensorRT loop definition owned by a network. 表示由 network 持有生命周期的 TensorRT loop 定义。
public sealed class TensorRtLoop : IDisposable
- Inheritance
-
TensorRtLoop
- Implements
- Inherited Members
Properties
Line
Gets the TensorRT API line used by this loop. 获取此 loop 使用的 TensorRT API 系列。
public TensorRtApiLine Line { get; }
Property Value
Name
Gets or sets the TensorRT loop name. 获取或设置 TensorRT loop 名称。
public string Name { get; set; }
Property Value
Methods
AddIterator(TensorRtTensor, int, bool)
Adds an iterator boundary layer to the loop. 向 loop 添加 iterator 边界层。
public TensorRtLayer AddIterator(TensorRtTensor tensor, int axis = 0, bool reverse = false)
Parameters
tensorTensorRtTensorTensor to iterate over. / 要进行迭代的张量。
axisintAxis along which TensorRT iterates. / TensorRT 迭代的轴。
reverseboolWhether to iterate in reverse order. / 是否反向迭代。
Returns
- TensorRtLayer
The network-owned iterator layer. / 由 network 持有生命周期的 iterator 层。
AddOutput(TensorRtTensor, TensorRtLoopOutputKind, int)
Adds a loop-output boundary layer. 添加 loop-output 边界层。
public TensorRtLayer AddOutput(TensorRtTensor tensor, TensorRtLoopOutputKind kind, int axis = 0)
Parameters
tensorTensorRtTensorTensor produced inside the loop. / loop 内部产生的张量。
kindTensorRtLoopOutputKindLoop output semantics. / loop 输出语义。
axisintConcatenation axis for concatenate-style outputs. / 拼接类输出使用的轴。
Returns
- TensorRtLayer
The network-owned loop-output layer. / 由 network 持有生命周期的 loop-output 层。
AddRecurrence(TensorRtTensor)
Adds a recurrence boundary layer to the loop. 向 loop 添加 recurrence 边界层。
public TensorRtLayer AddRecurrence(TensorRtTensor initialValue)
Parameters
initialValueTensorRtTensorInitial tensor value for the recurrence. / recurrence 的初始张量值。
Returns
- TensorRtLayer
The network-owned recurrence layer. / 由 network 持有生命周期的 recurrence 层。
AddTripLimit(TensorRtTensor, TensorRtTripLimitKind)
Adds a trip-limit boundary layer to the loop. 向 loop 添加 trip-limit 边界层。
public TensorRtLayer AddTripLimit(TensorRtTensor tensor, TensorRtTripLimitKind kind)
Parameters
tensorTensorRtTensorScalar count or while-condition tensor. / 标量计数或 while 条件张量。
kindTensorRtTripLimitKindTrip-limit interpretation. / trip-limit 解释方式。
Returns
- TensorRtLayer
The network-owned trip-limit layer. / 由 network 持有生命周期的 trip-limit 层。
Dispose()
Releases the managed bridge reference for this network-owned loop. 释放此 network-owned loop 的托管桥接引用。
public void Dispose()