7c4dce4bcbaf81f4ab50321431f9362b31239cf7,gluonbook/utils.py,,optimize,#Any#Any#Any#Any#Any#Any#Any#Any#,379

Before Change


            trainer.set_learning_rate(trainer.learning_rate * 0.1)
        for batch_i, (features, label) in enumerate(data_iter):
            with autograd.record():
                output = net(features)
                loss = square_loss(output, label)
            loss.backward()
            trainer.step(batch_size)
            if batch_i * batch_size % log_interval == 0:

After Change


    dataset = gdata.ArrayDataset(features, labels)
    data_iter = gdata.DataLoader(dataset, batch_size, shuffle=True)
    loss = gloss.L2Loss()
    ls = [loss(net(features), labels).mean().asnumpy()]
    for epoch in range(1, num_epochs + 1):
        // Decay the learning rate.
        if decay_epoch and epoch > decay_epoch:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: d2l-ai/d2l-zh
Commit Name: 7c4dce4bcbaf81f4ab50321431f9362b31239cf7
Time: 2018-05-14
Author: asv325@gmail.com
File Name: gluonbook/utils.py
Class Name:
Method Name: optimize


Project Name: d2l-ai/d2l-zh
Commit Name: cab512c5f1e12d3c3138b9b83e29bf53c3e5e6db
Time: 2018-05-12
Author: asv325@gmail.com
File Name: utils.py
Class Name:
Method Name: optimize


Project Name: dmlc/gluon-cv
Commit Name: 0fd13ccd7e61c9186127993080240c07b7ad905e
Time: 2019-10-28
Author: yizhu59@gmail.com
File Name: docs/tutorials/action_recognition/dive_deep_ucf101.py
Class Name:
Method Name: