---
title: weight
framework: ML Compute
role: symbol
role_heading: Instance Property
platforms: [iOS 14.0+, iPadOS 14.0+, Mac Catalyst 14.0+, macOS 11.0+, tvOS 14.0+]
path: mlcompute/mlclossdescriptor/weight
---

# weight

The scale factor you apply to each element of a result.

## Declaration

```swift
var weight: Float { get }
```

## Discussion

Discussion The default value is 1.0.

## See Also

### Inspecting Loss Descriptors

- [lossType](mlcompute/mlclossdescriptor/losstype.md)
- [reductionType](mlcompute/mlclossdescriptor/reductiontype.md)
- [labelSmoothing](mlcompute/mlclossdescriptor/labelsmoothing.md)
- [classCount](mlcompute/mlclossdescriptor/classcount.md)
- [epsilon](mlcompute/mlclossdescriptor/epsilon.md)
- [delta](mlcompute/mlclossdescriptor/delta.md)
