def get_same_padding(x: int, k: int, s: int, d: int) -> int:
    """
    Calculate asymmetric TensorFlow-like 'SAME' padding for a convolution
    Args:
        x(`Int`):
            Input tensor shape.
        k(`Int`):
            Convolution kernel size.
        s(`Int`):
            Convolution stride parameter.
        d(`Int`):
            Convolution dilation parameter.
    Returns:
        (`Int`):
            Padding value for 'SAME' padding.
    """
    return max((math.ceil(x / s) - 1) * s + (k - 1) * d + 1 - x, 0)
Calculate asymmetric TensorFlow-like 'SAME' padding for a convolution
Args:
x(`Int`):
Input tensor shape.
k(`Int`):
Convolution kernel size.
s(`Int`):
Convolution stride parameter.
d(`Int`):
Convolution dilation parameter.
Returns:
(`Int`):
Padding value for 'SAME' padding.
towhee/models/layers/padding_functions.py