(m)
Xavier initializer to be used with model.apply
Xavier initializer to be used with model.apply
Xavier initializer to be used with model . apply
def xavier_uniform_init(m):
    """
    Xavier initializer to be used with model.apply
    """
    if type(m) == nn.Linear: # TODO: Add Embeddings?
        nn.init.xavier_uniform_(m.weight.data)
def xavier_uniform_init ( m ) : if type ( m ) == nn . Linear : # TODO: Add Embeddings? nn . init . xavier_uniform_ ( m . weight . data )