def initialize_weights(model):
    '\n    Initializes the weights of a model in place.\n\n    :param model: An nn.Module.\n    '
    for param in model.parameters():
        if (param.dim() > 1):
            nn.init.xavier_normal_(param)
Initializes the weights of a model in place.

:param model: An nn.Module.
def initialize_weights(model):
    '\n    Initializes the weights of a model in place.\n\n    :param model: An nn.Module.\n    '
    for param in model.parameters():
        if (param.dim() > 1):
            nn.init.xavier_normal_(param)