AutoFormerV2 构造函数

定义

初始化 AutoFormerV2 类的新实例。

public AutoFormerV2 (int numClasses, System.Collections.Generic.List<int> embedChannels, System.Collections.Generic.List<int> depths, System.Collections.Generic.List<int> numHeads, TorchSharp.torch.Device device = default);
new Microsoft.ML.TorchSharp.AutoFormerV2.AutoFormerV2 : int * System.Collections.Generic.List<int> * System.Collections.Generic.List<int> * System.Collections.Generic.List<int> * TorchSharp.torch.Device -> Microsoft.ML.TorchSharp.AutoFormerV2.AutoFormerV2
Public Sub New (numClasses As Integer, embedChannels As List(Of Integer), depths As List(Of Integer), numHeads As List(Of Integer), Optional device As torch.Device = Nothing)

参数

numClasses
Int32

对象类别的数目。

embedChannels
List<Int32>

嵌入通道,用于控制模型的比例。

depths
List<Int32>

控制模型缩放的块数。

numHeads
List<Int32>

控制模型比例的头部数。

device
TorchSharp.torch.Device

模型推理的设备。

适用于