def kaiming_init(module, a=0, mode='fan_out', nonlinearity='relu', bias=0, distribution='normal'):
    assert (distribution in ['uniform', 'normal'])
    if (hasattr(module, 'weight') and (module.weight is not None)):
        if (distribution == 'uniform'):
            nn.init.kaiming_uniform_(module.weight, a=a, mode=mode, nonlinearity=nonlinearity)
        else:
            nn.init.kaiming_normal_(module.weight, a=a, mode=mode, nonlinearity=nonlinearity)
    if (hasattr(module, 'bias') and (module.bias is not None)):
        nn.init.constant_(module.bias, bias)
def kaiming_init(module, a=0, mode='fan_out', nonlinearity='relu', bias=0, distribution='normal'):
    assert (distribution in ['uniform', 'normal'])
    if (hasattr(module, 'weight') and (module.weight is not None)):
        if (distribution == 'uniform'):
            nn.init.kaiming_uniform_(module.weight, a=a, mode=mode, nonlinearity=nonlinearity)
        else:
            nn.init.kaiming_normal_(module.weight, a=a, mode=mode, nonlinearity=nonlinearity)
    if (hasattr(module, 'bias') and (module.bias is not None)):
        nn.init.constant_(module.bias, bias)