Share via


IMLCustomLayer Interface

Definition

Interface defining methods necessary for a custom model layer.

[Foundation.Protocol(Name="MLCustomLayer", WrapperType=typeof(CoreML.MLCustomLayerWrapper))]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetWeightData", ParameterByRef=new System.Boolean[] { false, true }, ParameterType=new System.Type[] { typeof(Foundation.NSData[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="setWeightData:error:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetOutputShapes", ParameterByRef=new System.Boolean[] { false, true }, ParameterType=new System.Type[] { typeof(Foundation.NSArray[]), typeof(Foundation.NSError) }, ReturnType=typeof(Foundation.NSArray[]), Selector="outputShapesForInputShapes:error:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="EvaluateOnCpu", ParameterByRef=new System.Boolean[] { false, false, true }, ParameterType=new System.Type[] { typeof(CoreML.MLMultiArray[]), typeof(CoreML.MLMultiArray[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="evaluateOnCPUWithInputs:outputs:error:")]
[Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="Encode", ParameterByRef=new System.Boolean[] { false, false, false, true }, ParameterType=new System.Type[] { typeof(Metal.IMTLCommandBuffer), typeof(Metal.IMTLTexture[]), typeof(Metal.IMTLTexture[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="encodeToCommandBuffer:inputs:outputs:error:")]
public interface IMLCustomLayer : IDisposable, ObjCRuntime.INativeObject
[<Foundation.Protocol(Name="MLCustomLayer", WrapperType=typeof(CoreML.MLCustomLayerWrapper))>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="SetWeightData", ParameterByRef=new System.Boolean[] { false, true }, ParameterType=new System.Type[] { typeof(Foundation.NSData[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="setWeightData:error:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="GetOutputShapes", ParameterByRef=new System.Boolean[] { false, true }, ParameterType=new System.Type[] { typeof(Foundation.NSArray[]), typeof(Foundation.NSError) }, ReturnType=typeof(Foundation.NSArray[]), Selector="outputShapesForInputShapes:error:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=true, IsStatic=false, Name="EvaluateOnCpu", ParameterByRef=new System.Boolean[] { false, false, true }, ParameterType=new System.Type[] { typeof(CoreML.MLMultiArray[]), typeof(CoreML.MLMultiArray[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="evaluateOnCPUWithInputs:outputs:error:")>]
[<Foundation.ProtocolMember(IsProperty=false, IsRequired=false, IsStatic=false, Name="Encode", ParameterByRef=new System.Boolean[] { false, false, false, true }, ParameterType=new System.Type[] { typeof(Metal.IMTLCommandBuffer), typeof(Metal.IMTLTexture[]), typeof(Metal.IMTLTexture[]), typeof(Foundation.NSError) }, ReturnType=typeof(System.Boolean), Selector="encodeToCommandBuffer:inputs:outputs:error:")>]
type IMLCustomLayer = interface
    interface INativeObject
    interface IDisposable
Attributes
Implements

Properties

Name Description
Handle

Handle (pointer) to the unmanaged object representation.

(Inherited from INativeObject)

Methods

Name Description
Encode(IMTLCommandBuffer, IMTLTexture[], IMTLTexture[], NSError)

Sets outputs by applying inputs to the function described by commandBuffer.

EvaluateOnCpu(MLMultiArray[], MLMultiArray[], NSError)

Sets outputs based on inputs using the CPU to do the calculations.

GetOutputShapes(NSArray[], NSError)

Retrieves the output data shape, as an array of numbers describing the dimensions of the output tensor.

SetWeightData(NSData[], NSError)

Sets the internal weights of the layer.

Extension Methods

Name Description
Encode(IMLCustomLayer, IMTLCommandBuffer, IMTLTexture[], IMTLTexture[], NSError)

Sets outputs by applying inputs to the function described by commandBuffer.

GetHandle(INativeObject)
GetNonNullHandle(INativeObject, String)

Applies to