def convert_padding() -> str:
    if (list(lhs_dilation) != ([1] * nb_spatial_dimensions)):
        raise error('Padding conversion is not supported for transposed convolution.')
    (lhs_perm, rhs_perm, _) = dimension_numbers
    effective_rhs_shape = [(((k - 1) * r) + 1) for (k, r) in zip(np.take(rhs.shape, rhs_perm)[2:], rhs_dilation)]
    lhs_shape = np.take(lhs.shape, lhs_perm)[2:]
    for pad_str in ['VALID', 'SAME']:
        gen_padding = lax.padtype_to_pads(lhs_shape, effective_rhs_shape, window_strides, pad_str)
        if (list(gen_padding) == list(padding)):
            return pad_str
    raise error('Input padding not supported in TensorFlow.')
def convert_padding() -> str:
    if (list(lhs_dilation) != ([1] * nb_spatial_dimensions)):
        raise error('Padding conversion is not supported for transposed convolution.')
    (lhs_perm, rhs_perm, _) = dimension_numbers
    effective_rhs_shape = [(((k - 1) * r) + 1) for (k, r) in zip(np.take(rhs.shape, rhs_perm)[2:], rhs_dilation)]
    lhs_shape = np.take(lhs.shape, lhs_perm)[2:]
    for pad_str in ['VALID', 'SAME']:
        gen_padding = lax.padtype_to_pads(lhs_shape, effective_rhs_shape, window_strides, pad_str)
        if (list(gen_padding) == list(padding)):
            return pad_str
    raise error('Input padding not supported in TensorFlow.')