---
title: "node(with:source:)"
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:source:)"
---

# node(with:source:)

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

## Declaration

```swift
func node(with layer: MLCLayer, source: MLCTensor) -> MLCTensor?
```

## Parameters

- `layer`: The layer.
- `source`: The source tensor.

## Return Value

Return Value A result tensor.

## See Also

### Adding Layers to Graphs

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