c123c6896539b3a3cd9fbc72c6b02ad37c415aff,cifar.py,,main,#,10

Before Change


    optimizer = optim.SGD(lr=1e-1, momentum=0.9, weight_decay=1e-4)
    scheduler = lr_scheduler.StepLR(80, 0.1)
    tqdm_rep = reporters.TQDMReporter(range(args.epochs), callbacks=[callbacks.AccuracyCallback()])
    trainer = Trainer(model, optimizer, F.cross_entropy, scheduler=scheduler, callbacks=[tqdm_rep])
    for _ in tqdm_rep:
        trainer.train(train_loader)
        trainer.test(test_loader)

After Change


    scheduler = lr_scheduler.StepLR(80, 0.1)
    tqdm_rep = reporters.TQDMReporter(range(args.epochs))
    _callbacks = [tqdm_rep, callbacks.AccuracyCallback()]
    with Trainer(model, optimizer, F.cross_entropy, scheduler=scheduler, callbacks=_callbacks) as trainer:
        for _ in tqdm_rep:
            trainer.train(train_loader)
            trainer.test(test_loader)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: moskomule/senet.pytorch
Commit Name: c123c6896539b3a3cd9fbc72c6b02ad37c415aff
Time: 2019-11-26
Author: moskomule@users.noreply.github.com
File Name: cifar.py
Class Name:
Method Name: main


Project Name: inferno-pytorch/inferno
Commit Name: 31371deaea42ffe74c886504fe7fb52e8e248fa1
Time: 2018-08-09
Author: thorsten.beier@iwr.uni-heidelberg.de
File Name: examples/trainer.py
Class Name:
Method Name:


Project Name: inferno-pytorch/inferno
Commit Name: 31371deaea42ffe74c886504fe7fb52e8e248fa1
Time: 2018-08-09
Author: thorsten.beier@iwr.uni-heidelberg.de
File Name: examples/train_side_loss_unet.py
Class Name:
Method Name:


Project Name: williamFalcon/pytorch-lightning
Commit Name: f4cc7451a94010a572480c43ad5f0af7ad52cd21
Time: 2021-03-10
Author: eliacereda@gmail.com
File Name: tests/trainer/test_dataloaders.py
Class Name:
Method Name: test_dataloaders_with_fast_dev_run