def is_batchnorm_bias(torch_name, torch_weights):
    """
    Crude way of checking if a torch weight is a batchnorm bias
    Args:
        torch_name: The name of a torch weight
        torch_weights: The state_dict of a torch model
    """
    if not torch_name.endswith('bias'):
        return False
    running_mean_name = torch_name[:-4] + 'running_mean'
    return running_mean_name in torch_weights