def freeze_all_layers(model):
    """
    Freezes all layers in the network
    :param model: torchvision.models.module
    :return: torchvision.models.module
    """
    for params in model.parameters():
        params.requires_grad = False
    return model