---
title: "node(with:sources:)"
framework: ML Compute
role: symbol
role_heading: Instance Method
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: "mlcompute/mlcgraph/node(with:sources:)"
---

# node(with:sources:)

Adds the layer and source tensors that you specify to the graph.

## Declaration

```swift
func node(with layer: MLCLayer, sources: [MLCTensor]) -> MLCTensor?
```

## Parameters

- `layer`: The layer.
- `sources`: An array that contains the source tensors.

## Return Value

Return Value A result tensor.

## See Also

### Adding Layers to Graphs

- [node(with:source:)](mlcompute/mlcgraph/node(with:source:).md)
- [node(with:sources:disableUpdate:)](mlcompute/mlcgraph/node(with:sources:disableupdate:).md)
- [node(with:sources:lossLabels:)](mlcompute/mlcgraph/node(with:sources:losslabels:).md)
