---
title: MLCInferenceGraph
framework: ML Compute
role: symbol
role_heading: Class
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlcinferencegraph
---

# MLCInferenceGraph

An inference graph created from one or more MLCGraph instances plus additional layers added directly to the inference graph.

## Declaration

```swift
class MLCInferenceGraph
```

## Topics

### Creating Inference Graphs

- [init(graphObjects:)](mlcompute/mlcinferencegraph/init(graphobjects:).md)

### Preparing Inference Graphs

- [addInputs(_:)](mlcompute/mlcinferencegraph/addinputs(_:).md)
- [addInputs(_:lossLabels:lossLabelWeights:)](mlcompute/mlcinferencegraph/addinputs(_:losslabels:losslabelweights:).md)
- [addOutputs(_:)](mlcompute/mlcinferencegraph/addoutputs(_:).md)
- [compile(options:device:)](mlcompute/mlcinferencegraph/compile(options:device:).md)
- [compile(options:device:inputTensors:inputTensorsData:)](mlcompute/mlcinferencegraph/compile(options:device:inputtensors:inputtensorsdata:).md)
- [link(with:)](mlcompute/mlcinferencegraph/link(with:).md)
- [MLCGraphCompilationOptions](mlcompute/mlcgraphcompilationoptions.md)

### Executing Inference Graphs

- [execute(inputsData:batchSize:options:completionHandler:)](mlcompute/mlcinferencegraph/execute(inputsdata:batchsize:options:completionhandler:).md)
- [execute(inputsData:outputsData:batchSize:options:completionHandler:)](mlcompute/mlcinferencegraph/execute(inputsdata:outputsdata:batchsize:options:completionhandler:).md)
- [execute(inputsData:lossLabelsData:lossLabelWeightsData:batchSize:options:completionHandler:)](mlcompute/mlcinferencegraph/execute(inputsdata:losslabelsdata:losslabelweightsdata:batchsize:options:completionhandler:).md)
- [execute(inputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:completionHandler:)](mlcompute/mlcinferencegraph/execute(inputsdata:losslabelsdata:losslabelweightsdata:outputsdata:batchsize:options:completionhandler:).md)
- [execute(inputsData:lossLabelsData:lossLabelWeightsData:outputsData:batchSize:options:)](mlcompute/mlcinferencegraph/execute(inputsdata:losslabelsdata:losslabelweightsdata:outputsdata:batchsize:options:).md)
- [MLCExecutionOptions](mlcompute/mlcexecutionoptions.md)
- [MLCGraphCompletionHandler](mlcompute/mlcgraphcompletionhandler.md)

### Inspecting Inference Graphs

- [deviceMemorySize](mlcompute/mlcinferencegraph/devicememorysize.md)

### Initializers

- [init()](mlcompute/mlcinferencegraph/init().md)

## Relationships

### Inherits From

- [MLCGraph](mlcompute/mlcgraph.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)

## See Also

### Graphs

- [MLCGraph](mlcompute/mlcgraph.md)
- [MLCTrainingGraph](mlcompute/mlctraininggraph.md)
