Share via


MPSGraph_MPSGraphMatrixMultiplicationOps.ScaledDotProductAttention Method

Definition

Overloads

ScaledDotProductAttention(MPSGraph, MPSGraphTensor, MPSGraphTensor, MPSGraphTensor, Single, String)

[Foundation.Export("scaledDotProductAttentionWithQueryTensor:keyTensor:valueTensor:scale:name:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static MetalPerformanceShadersGraph.MPSGraphTensor ScaledDotProductAttention(this MetalPerformanceShadersGraph.MPSGraph This, MetalPerformanceShadersGraph.MPSGraphTensor queryTensor, MetalPerformanceShadersGraph.MPSGraphTensor keyTensor, MetalPerformanceShadersGraph.MPSGraphTensor valueTensor, float scale, string? name);
[<Foundation.Export("scaledDotProductAttentionWithQueryTensor:keyTensor:valueTensor:scale:name:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member ScaledDotProductAttention : MetalPerformanceShadersGraph.MPSGraph * MetalPerformanceShadersGraph.MPSGraphTensor * MetalPerformanceShadersGraph.MPSGraphTensor * MetalPerformanceShadersGraph.MPSGraphTensor * single * string -> MetalPerformanceShadersGraph.MPSGraphTensor

Parameters

This
MPSGraph
queryTensor
MPSGraphTensor
keyTensor
MPSGraphTensor
valueTensor
MPSGraphTensor
scale
Single
name
String

Returns

Attributes

Applies to

ScaledDotProductAttention(MPSGraph, MPSGraphTensor, MPSGraphTensor, MPSGraphTensor, MPSGraphTensor, Single, String)

[Foundation.Export("scaledDotProductAttentionWithQueryTensor:keyTensor:valueTensor:maskTensor:scale:name:")]
[ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)]
public static MetalPerformanceShadersGraph.MPSGraphTensor ScaledDotProductAttention(this MetalPerformanceShadersGraph.MPSGraph This, MetalPerformanceShadersGraph.MPSGraphTensor queryTensor, MetalPerformanceShadersGraph.MPSGraphTensor keyTensor, MetalPerformanceShadersGraph.MPSGraphTensor valueTensor, MetalPerformanceShadersGraph.MPSGraphTensor? maskTensor, float scale, string? name);
[<Foundation.Export("scaledDotProductAttentionWithQueryTensor:keyTensor:valueTensor:maskTensor:scale:name:")>]
[<ObjCRuntime.BindingImpl(ObjCRuntime.BindingImplOptions.GeneratedCode | ObjCRuntime.BindingImplOptions.Optimizable)>]
static member ScaledDotProductAttention : MetalPerformanceShadersGraph.MPSGraph * MetalPerformanceShadersGraph.MPSGraphTensor * MetalPerformanceShadersGraph.MPSGraphTensor * MetalPerformanceShadersGraph.MPSGraphTensor * MetalPerformanceShadersGraph.MPSGraphTensor * single * string -> MetalPerformanceShadersGraph.MPSGraphTensor

Parameters

This
MPSGraph
queryTensor
MPSGraphTensor
keyTensor
MPSGraphTensor
valueTensor
MPSGraphTensor
maskTensor
MPSGraphTensor
scale
Single
name
String

Returns

Attributes

Applies to