Initializer

init(parameters:)

Initializes the custom layer implementation.

Required.

Declaration

init(parameters: [String : Any]) throws

Parameters

parameters

The contents of the parameter dictionary from the .mlmodel file.

Discussion

Implement this method to initialize your custom layer. It is called once, at load time. Use the parameters to configure the custom layer as needed.

If the layer cannot be initialized, your implementation should throw a customLayer error.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software