---
title: MLCustomLayer
framework: coreml
role: symbol
role_heading: Protocol
path: coreml/mlcustomlayer
---

# MLCustomLayer

An interface that defines the behavior of a custom layer in your neural network model.

## Declaration

```swift
protocol MLCustomLayer
```

## Mentioned in

Creating and Integrating a Model with Custom Layers

## Overview

Overview You use the MLCustomLayer protocol to define the behavior of your own neural network layers in Core ML models. You can deploy novel or proprietary models on your own release schedule. Custom layers also provide a mechanism for pre- or post-processing during model evaluation.

## Topics

### Creating a layer

- [init(parameters:)](coreml/mlcustomlayer/init(parameters:).md)

### Integrating a layer

- [setWeightData(_:)](coreml/mlcustomlayer/setweightdata(_:).md)
- [outputShapes(forInputShapes:)](coreml/mlcustomlayer/outputshapes(forinputshapes:).md)

### Evaluating a layer

- [evaluate(inputs:outputs:)](coreml/mlcustomlayer/evaluate(inputs:outputs:).md)
- [encode(commandBuffer:inputs:outputs:)](coreml/mlcustomlayer/encode(commandbuffer:inputs:outputs:).md)

### Initializers

- [init(parameterDictionary:)](coreml/mlcustomlayer/init(parameterdictionary:).md)

## See Also

### Custom model layers

- [Creating and Integrating a Model with Custom Layers](coreml/creating-and-integrating-a-model-with-custom-layers.md)
