BasicLayer 构造函数

定义

初始化 BasicLayer 类的新实例。

public BasicLayer(int inChannels, int outChannels, int depth, int numHeads, int windowSize, double mlpRatio = 4, double dropRatio = 0, int localConvSize = 3, bool useShiftWindow = false, bool useInterpolate = false);
new Microsoft.ML.TorchSharp.AutoFormerV2.BasicLayer : int * int * int * int * int * double * double * int * bool * bool -> Microsoft.ML.TorchSharp.AutoFormerV2.BasicLayer
Public Sub New (inChannels As Integer, outChannels As Integer, depth As Integer, numHeads As Integer, windowSize As Integer, 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

输入通道。

outChannels
Int32

输出通道。

depth
Int32

块数。

numHeads
Int32

头数。

windowSize
Int32

窗口的大小。

mlpRatio
Double

MLP 的比率。

dropRatio
Double

下降比率。

localConvSize
Int32

本地卷积的大小。

useShiftWindow
Boolean

是否使用移位窗口。

useInterpolate
Boolean

是否使用内插。

适用于