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

# addInputs(_:lossLabels:lossLabelWeights:)

Adds the inputs, loss labels, and loss label weights that you specify to the inference graph.

## Declaration

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

## Parameters

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

## Return Value

Return Value true if the operation was successful.

## See Also

### Preparing Inference Graphs

- [addInputs(_:)](mlcompute/mlcinferencegraph/addinputs(_:).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)
