def initialize(config):
    model = utils.get_model(config['model'])
    model = idist.auto_model(model)
    optimizer = optim.SGD(model.parameters(), lr=config['learning_rate'], momentum=config['momentum'], weight_decay=config['weight_decay'], nesterov=True)
    optimizer = idist.auto_optim(optimizer)
    criterion = nn.CrossEntropyLoss().to(idist.device())
    le = config['num_iters_per_epoch']
    milestones_values = [(0, 0.0), ((le * config['num_warmup_epochs']), config['learning_rate']), ((le * config['num_epochs']), 0.0)]
    lr_scheduler = PiecewiseLinear(optimizer, param_name='lr', milestones_values=milestones_values)
    return (model, optimizer, criterion, lr_scheduler)
def initialize(config):
    model = utils.get_model(config['model'])
    model = idist.auto_model(model)
    optimizer = optim.SGD(model.parameters(), lr=config['learning_rate'], momentum=config['momentum'], weight_decay=config['weight_decay'], nesterov=True)
    optimizer = idist.auto_optim(optimizer)
    criterion = nn.CrossEntropyLoss().to(idist.device())
    le = config['num_iters_per_epoch']
    milestones_values = [(0, 0.0), ((le * config['num_warmup_epochs']), config['learning_rate']), ((le * config['num_epochs']), 0.0)]
    lr_scheduler = PiecewiseLinear(optimizer, param_name='lr', milestones_values=milestones_values)
    return (model, optimizer, criterion, lr_scheduler)