---
title: shouldRescore
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/mlcyololossdescriptor/shouldrescore
---

# shouldRescore

A Boolean that indicates whether the layer scales the object confidence loss by the intersection over union (IOU) overlap.

## Declaration

```swift
var shouldRescore: Bool { get set }
```

## Discussion

Discussion If true, the layer scales the loss by the IOU overlap; otherwise, the layer doesn’t scale the loss by the IOU overlap. The default value is true. Rescore pertains to multiplying the confidence groundTruth with the intersection over union (IOU) of the predicted bounding box and the groundTruth boundingBox.

## See Also

### Inspecting YOLO Loss Descriptors

- [anchorBoxCount](mlcompute/mlcyololossdescriptor/anchorboxcount.md)
- [anchorBoxes](mlcompute/mlcyololossdescriptor/anchorboxes.md)
- [maximumIOUForObjectAbsence](mlcompute/mlcyololossdescriptor/maximumiouforobjectabsence.md)
- [minimumIOUForObjectPresence](mlcompute/mlcyololossdescriptor/minimumiouforobjectpresence.md)
- [scaleClassLoss](mlcompute/mlcyololossdescriptor/scaleclassloss.md)
- [scaleObjectConfidenceLoss](mlcompute/mlcyololossdescriptor/scaleobjectconfidenceloss.md)
- [scaleNoObjectConfidenceLoss](mlcompute/mlcyololossdescriptor/scalenoobjectconfidenceloss.md)
- [scaleSpatialPositionLoss](mlcompute/mlcyololossdescriptor/scalespatialpositionloss.md)
- [scaleSpatialSizeLoss](mlcompute/mlcyololossdescriptor/scalespatialsizeloss.md)
