def _decode(loc: torch.Tensor, priors: torch.Tensor, variances: List[float]) -> torch.Tensor:
    'Decode locations from predictions using priors to undo the encoding we did for offset regression at train\n    time.\n\n    Args:\n        loc:location predictions for loc layers. Shape: [num_priors,4].\n        priors: Prior boxes in center-offset form. Shape: [num_priors,4].\n        variances: (list[float]) Variances of priorboxes.\n\n    Return:\n        Tensor containing decoded bounding box predictions.\n    '
    boxes = torch.cat(((priors[:, 0:2] + ((loc[:, 0:2] * variances[0]) * priors[:, 2:4])), (priors[:, 2:4] * torch.exp((loc[:, 2:4] * variances[1]))), (priors[:, 0:2] + ((loc[:, 4:6] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 6:8] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 8:10] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 10:12] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 12:14] * variances[0]) * priors[:, 2:4]))), 1)
    tmp = (boxes[:, 0:2] - (boxes[:, 2:4] / 2))
    return torch.cat((tmp, (boxes[:, 2:4] + tmp), boxes[:, 4:]), dim=(- 1))
Decode locations from predictions using priors to undo the encoding we did for offset regression at train
time.

Args:
    loc:location predictions for loc layers. Shape: [num_priors,4].
    priors: Prior boxes in center-offset form. Shape: [num_priors,4].
    variances: (list[float]) Variances of priorboxes.

Return:
    Tensor containing decoded bounding box predictions.
def _decode(loc: torch.Tensor, priors: torch.Tensor, variances: List[float]) -> torch.Tensor:
    'Decode locations from predictions using priors to undo the encoding we did for offset regression at train\n    time.\n\n    Args:\n        loc:location predictions for loc layers. Shape: [num_priors,4].\n        priors: Prior boxes in center-offset form. Shape: [num_priors,4].\n        variances: (list[float]) Variances of priorboxes.\n\n    Return:\n        Tensor containing decoded bounding box predictions.\n    '
    boxes = torch.cat(((priors[:, 0:2] + ((loc[:, 0:2] * variances[0]) * priors[:, 2:4])), (priors[:, 2:4] * torch.exp((loc[:, 2:4] * variances[1]))), (priors[:, 0:2] + ((loc[:, 4:6] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 6:8] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 8:10] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 10:12] * variances[0]) * priors[:, 2:4])), (priors[:, 0:2] + ((loc[:, 12:14] * variances[0]) * priors[:, 2:4]))), 1)
    tmp = (boxes[:, 0:2] - (boxes[:, 2:4] / 2))
    return torch.cat((tmp, (boxes[:, 2:4] + tmp), boxes[:, 4:]), dim=(- 1))