def constant_init(module, val, bias=0):
    nn.init.constant_(module.weight, val)
    if (hasattr(module, 'bias') and (module.bias is not None)):
        nn.init.constant_(module.bias, bias)
def constant_init(module, val, bias=0):
    nn.init.constant_(module.weight, val)
    if (hasattr(module, 'bias') and (module.bias is not None)):
        nn.init.constant_(module.bias, bias)