Attention(Int32, Int32, Int32, Int32, List<Int32>) 构造函数

定义

初始化 Attention 类的新实例。

public Attention (int inChannels, int keyChannels, int numHeads = 8, int attnRatio = 4, System.Collections.Generic.List<int> windowResolution = default);
new Microsoft.ML.TorchSharp.AutoFormerV2.Attention : int * int * int * int * System.Collections.Generic.List<int> -> Microsoft.ML.TorchSharp.AutoFormerV2.Attention
Public Sub New (inChannels As Integer, keyChannels As Integer, Optional numHeads As Integer = 8, Optional attnRatio As Integer = 4, Optional windowResolution As List(Of Integer) = Nothing)

参数

inChannels
Int32

输入通道。

keyChannels
Int32

关键通道。

numHeads
Int32

块数。

attnRatio
Int32

注意力比率。

windowResolution
List<Int32>

窗口的分辨率。

适用于