IMLCustomLayer Interface
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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 |
| EvaluateOnCpu(MLMultiArray[], MLMultiArray[], NSError) |
Sets |
| 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 |
| GetHandle(INativeObject) | |
| GetNonNullHandle(INativeObject, String) | |