def dim_transform_inv(dims, mean=None, std=None):
    """ Unnormalizes (usually regression results) to get predicted dims.

    The mean and std are the mean and std as applied in the generator. They are unnormalized in this function and then applied to the dims.
    
    Args
        dims : np.array of shape (B, N, 3*num_classes), where B is the batch size, N the number of anchors, with num_classes (height, width, length) for each anchor.
        mean  : The mean value used when computing dims.
        std   : The standard deviation used when computing dims.

    Returns
        A np.array of the same shape as dims, but unnormalized.
        The mean and std are used during training to normalize the regression values (networks love normalization).
    """

    pred_dims = dims * std + mean

    return pred_dims