---
title: "dispatchNetwork(intermediatesHeap:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4machinelearningcommandencoder/dispatchnetwork(intermediatesheap:)"
---

# dispatchNetwork(intermediatesHeap:)

Dispatches a machine learning network using the current pipeline state and argument table.

## Declaration

```swift
func dispatchNetwork(intermediatesHeap heap: any MTLHeap)
```

## Parameters

- `heap`: A heap that Metal can use to allocate intermediate tensors.

## Discussion

Discussion This method takes a parameter consisting of a MTLHeap that Metal can use to allocate intermediate tensors. You can query the minimum size Metal requires for this heap by calling intermediatesHeapSize.
