---
title: function
framework: accelerate
role: symbol
role_heading: Instance Property
path: accelerate/bnnslayerparameterslosssoftmaxcrossentropy/function
---

# function

The function that’s used to compute loss.

## Declaration

```swift
var function: BNNSLossFunction
```

## See Also

### Instance Properties

- [i_desc](accelerate/bnnslayerparameterslosssoftmaxcrossentropy/i_desc.md)
- [o_desc](accelerate/bnnslayerparameterslosssoftmaxcrossentropy/o_desc.md)
- [reduction](accelerate/bnnslayerparameterslosssoftmaxcrossentropy/reduction.md)
- [label_smooth](accelerate/bnnslayerparameterslosssoftmaxcrossentropy/label_smooth.md)
