AutoFormerV2Block 构造函数

定义

初始化 AutoFormerV2Block 类的新实例。

public AutoFormerV2Block (int inChannels, int numHeads, int windowSize = 7, int shiftSize = 0, double mlpRatio = 4, double dropRatio = 0, int localConvSize = 3, bool useShiftWindow = false, bool useInterpolate = false);
new Microsoft.ML.TorchSharp.AutoFormerV2.AutoFormerV2Block : int * int * int * int * double * double * int * bool * bool -> Microsoft.ML.TorchSharp.AutoFormerV2.AutoFormerV2Block
Public Sub New (inChannels As Integer, numHeads As Integer, Optional windowSize As Integer = 7, Optional shiftSize As Integer = 0, Optional mlpRatio As Double = 4, Optional dropRatio As Double = 0, Optional localConvSize As Integer = 3, Optional useShiftWindow As Boolean = false, Optional useInterpolate As Boolean = false)

参数

inChannels
Int32

输入通道。

numHeads
Int32

块数。

windowSize
Int32

窗口的大小。

shiftSize
Int32

移位的大小。

mlpRatio
Double

MLP 的比率。

dropRatio
Double

下降比率。

localConvSize
Int32

本地卷积的大小。

useShiftWindow
Boolean

是否使用移位窗口。

useInterpolate
Boolean

是否使用内插。

适用于