def kaiming_uniform_(tensor,
                     a=0,
                     mode='fan_in',
                     nonlinearity='leaky_relu',
                     reverse=False):
    """
    Modify tensor in place using kaiming_uniform method
    Args:
        tensor (paddle.Tensor): paddle tensor.
        mode (str): a value in ['fan_in', 'fan_out'], 'fin_in' by default.
        nonlinearity (str): nonlinearity method name.
        reverse (bool): tensor data format order, default to False.
    Return:
        tensor
    """
    fan = _calculate_correct_fan(tensor, mode, reverse)
    gain = _calculate_gain(nonlinearity, a)
    std = gain / math.sqrt(fan)
    k = math.sqrt(3.0) * std
    return _no_grad_uniform_(tensor, -k, k)

    Modify tensor in place using kaiming_uniform method
    Args:
        tensor (paddle.Tensor): paddle tensor.
        mode (str): a value in ['fan_in', 'fan_out'], 'fin_in' by default.
        nonlinearity (str): nonlinearity method name.
        reverse (bool): tensor data format order, default to False.
    Return:
        tensor
    
contrib/CrossPseudoSupervision/models/initializer.py