Contents

init(parameters:)

Initializes the custom layer implementation.

Declaration

init(parameters: [String : Any]) throws

Parameters

  • parameters:

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

Mentioned in

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.