aa538de146783494dfcdfc278d32aa8d1de2d844,imagenet.py,,main,#,32
Before Change
gpus = list(range(torch.cuda.device_count()))
se_resnet = nn.DataParallel(se_resnet50(num_classes=1000),
device_ids=gpus)
optimizer = optim.SGD(params=se_resnet.parameters(), lr=0.6 / 1024 * batch_size, momentum=0.9, weight_decay=1e-4)
scheduler = optim.lr_scheduler.StepLR(optimizer, 30, gamma=0.1)
trainer = Trainer(se_resnet, optimizer, F.cross_entropy, save_dir=".")
trainer.loop(100, train_loader, test_loader, scheduler)
After Change
optimizer = optim.SGD(lr=0.6 / 1024 * args.batch_size, momentum=0.9, weight_decay=1e-4)
scheduler = lr_scheduler.StepLR(30, gamma=0.1)
weight_saver = callbacks.WeightSave("checkpoints")
tqdm_rep = reporter.TQDMReporter(range(args.epochs), callbacks=[callbacks.LossCallback(),
callbacks.AccuracyCallback])
trainer = Trainer(se_resnet, optimizer, F.cross_entropy, scheduler=scheduler,
callbacks=callbacks.CallbackList(weight_saver, tqdm_rep))
for _ in tqdm_rep:
trainer.train(train_loader)
trainer.test(test_loader)
if __name__ == "__main__":
import argparse
p = argparse.ArgumentParser()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: moskomule/senet.pytorch
Commit Name: aa538de146783494dfcdfc278d32aa8d1de2d844
Time: 2018-12-19
Author: hataya@keio.jp
File Name: imagenet.py
Class Name:
Method Name: main
Project Name: moskomule/senet.pytorch
Commit Name: aa538de146783494dfcdfc278d32aa8d1de2d844
Time: 2018-12-19
Author: hataya@keio.jp
File Name: cifar.py
Class Name:
Method Name: main
Project Name: layumi/Person_reID_baseline_pytorch
Commit Name: f91546f0f17bc6869204e12fb9cc7ce2ec061746
Time: 2017-12-29
Author: zzheng@joo-ml1-dev.j.cinglevue.com
File Name: train.py
Class Name:
Method Name: