def differentiable_polynomial_floor(input: Tensor) -> Tensor:
    """Perform floor via a differentiable operation.

    Args:
        input (Tensor): Input tensor of any shape to be floored.

    Returns:
        output (Tensor): Pseudo rounded tensor of the same shape as input tensor.

    """
    # Perform differentiable rounding
    input_floor = input.floor()
    output: Tensor = input_floor + (input - 0.5 - input_floor) ** 3
    return output
Perform floor via a differentiable operation.

    Args:
        input (Tensor): Input tensor of any shape to be floored.

    Returns:
        output (Tensor): Pseudo rounded tensor of the same shape as input tensor.

    
kornia/utils/misc.py