---
title: "addInputs(_:lossLabels:)"
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/mlctraininggraph/addinputs(_:losslabels:)"
---

# addInputs(_:lossLabels:)

Adds the inputs and loss label inputs that you specify to the training graph.

## Declaration

```swift
func addInputs(_ inputs: [String : MLCTensor], lossLabels: [String : MLCTensor]?) -> Bool
```

## Parameters

- `inputs`: A dictionary that contains inputs.
- `lossLabels`: A dictionary that contains loss label inputs.

## Return Value

Return Value true if the operation was successful.

## See Also

### Preparing Training Graphs

- [addInputs(_:lossLabels:lossLabelWeights:)](mlcompute/mlctraininggraph/addinputs(_:losslabels:losslabelweights:).md)
- [addOutputs(_:)](mlcompute/mlctraininggraph/addoutputs(_:).md)
- [stopGradient(for:)](mlcompute/mlctraininggraph/stopgradient(for:).md)
- [compileOptimizer(_:)](mlcompute/mlctraininggraph/compileoptimizer(_:).md)
- [compile(options:device:)](mlcompute/mlctraininggraph/compile(options:device:).md)
- [compile(options:device:inputTensors:inputTensorsData:)](mlcompute/mlctraininggraph/compile(options:device:inputtensors:inputtensorsdata:).md)
- [link(with:)](mlcompute/mlctraininggraph/link(with:).md)
- [allocateUserGradient(for:)](mlcompute/mlctraininggraph/allocateusergradient(for:).md)
- [MLCGraphCompilationOptions](mlcompute/mlcgraphcompilationoptions.md)
