<!--
{
  "availability" : [
    "iOS: 14.0.0 - 18.0.0",
    "iPadOS: 14.0.0 - 18.0.0",
    "macCatalyst: 14.0.0 - 18.0.0",
    "macOS: 11.0.0 - 15.0.0",
    "tvOS: 14.0.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 7.0.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/BNNSLayerParametersLossYolo",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@SA@BNNSLayerParametersLossYolo"
  },
  "title" : "BNNSLayerParametersLossYolo"
}
-->

# BNNSLayerParametersLossYolo

A structure that contains the parameters of a You Only Look Once (YOLO) loss layer.

```
struct BNNSLayerParametersLossYolo
```

## Topics

### Initializers

[`init(function:i_desc:o_desc:reduction:huber_delta:number_of_grid_columns:number_of_grid_rows:number_of_anchor_boxes:anchor_box_size:rescore:scale_xy:scale_wh:scale_object:scale_no_object:scale_classification:object_minimum_iou:no_object_maximum_iou:anchors_data:)`](/documentation/Accelerate/BNNSLayerParametersLossYolo/init(function:i_desc:o_desc:reduction:huber_delta:number_of_grid_columns:number_of_grid_rows:number_of_anchor_boxes:anchor_box_size:rescore:scale_xy:scale_wh:scale_object:scale_no_object:scale_classification:object_minimum_iou:no_object_maximum_iou:anchors_data:))

Returns a new You Only Look Once (YOLO) loss layer parameters structure from the specified parameters.

### Instance Properties

[`function`](/documentation/Accelerate/BNNSLayerParametersLossYolo/function)

The function that’s used to compute loss.

[`i_desc`](/documentation/Accelerate/BNNSLayerParametersLossYolo/i_desc)

The descriptor of the input.

[`o_desc`](/documentation/Accelerate/BNNSLayerParametersLossYolo/o_desc)

The descriptor of the output.

[`reduction`](/documentation/Accelerate/BNNSLayerParametersLossYolo/reduction)

The function that’s used to reduce the computed loss (must be sum reduction for YOLO).

[`huber_delta`](/documentation/Accelerate/BNNSLayerParametersLossYolo/huber_delta)

A value that’s interpreted as width-height loss.

[`number_of_grid_columns`](/documentation/Accelerate/BNNSLayerParametersLossYolo/number_of_grid_columns)

The number of columns in the grid.

[`number_of_grid_rows`](/documentation/Accelerate/BNNSLayerParametersLossYolo/number_of_grid_rows)

The number of rows in the grid.

[`number_of_anchor_boxes`](/documentation/Accelerate/BNNSLayerParametersLossYolo/number_of_anchor_boxes)

The number of anchor boxes in each cell.

[`anchor_box_size`](/documentation/Accelerate/BNNSLayerParametersLossYolo/anchor_box_size)

The size of the anchor box.

[`rescore`](/documentation/Accelerate/BNNSLayerParametersLossYolo/rescore)

A Boolean value that determines whether to rescore confidence according to prediction verus ground truth Intersection Over Union (IOU).

[`scale_xy`](/documentation/Accelerate/BNNSLayerParametersLossYolo/scale_xy)

The value that specifies the x, y loss-scaling factor.

[`scale_wh`](/documentation/Accelerate/BNNSLayerParametersLossYolo/scale_wh)

A Boolean value that determines whether to rescore confidence according to prediction verus ground truth Intersection Over Union (IOU).

[`scale_object`](/documentation/Accelerate/BNNSLayerParametersLossYolo/scale_object)

The value that specifies the object confidence loss-scaling factor.

[`scale_no_object`](/documentation/Accelerate/BNNSLayerParametersLossYolo/scale_no_object)

The value that specifies the no-object confidence scaling factor.

[`object_minimum_iou`](/documentation/Accelerate/BNNSLayerParametersLossYolo/object_minimum_iou)

The value that specifies intersection over union (IOU) that’s the minimum the function treats as an object.

[`no_object_maximum_iou`](/documentation/Accelerate/BNNSLayerParametersLossYolo/no_object_maximum_iou)

The value that specifies intersection over union (IOU) that’s the maximum the function treats as not an object.

[`scale_classification`](/documentation/Accelerate/BNNSLayerParametersLossYolo/scale_classification)

The value that specifies the classification scaling factor.

[`anchors_data`](/documentation/Accelerate/BNNSLayerParametersLossYolo/anchors_data)

Maximum IOU for treating as no object.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)