---
title: MLCustomModel
framework: coreml
role: symbol
role_heading: Protocol
path: coreml/mlcustommodel
---

# MLCustomModel

An interface that defines the behavior of a custom model.

## Declaration

```swift
protocol MLCustomModel
```

## Overview

Overview To integrate your custom model with Core ML, adopt the MLCustomModel protocol in the implementation of your custom model. If you use a Swift class for your custom implementation, make it accessible to Core ML by using the @objc(name) attribute. @objc(MyCustomModel) class MyCustomModel: NSObject, MLCustomModel {   ... } This defines the Objective-C name for the class, which Core ML needs to access your custom class’s implementation.

## Topics

### Creating the model

- [init(modelDescription:parameters:)](coreml/mlcustommodel/init(modeldescription:parameters:).md)

### Making predictions

- [prediction(from:options:)](coreml/mlcustommodel/prediction(from:options:).md)
- [predictions(from:options:)](coreml/mlcustommodel/predictions(from:options:).md)

### Initializers

- [init(modelDescription:parameterDictionary:)](coreml/mlcustommodel/init(modeldescription:parameterdictionary:).md)
