21994919156aac15558f77555538346fb702bcbc,autokeras/nn/model_trainer.py,ModelTrainer,train_model,#ModelTrainer#Any#Any#,84
Before Change
test_metric_value_list = []
test_loss_list = []
self.optimizer = torch.optim.Adam(self.model.parameters())
for epoch in range(max_iter_num):
self._train()
test_loss, metric_value = self._test()
After Change
test_metric_value_list = []
test_loss_list = []
self.optimizer = torch.optim.SGD(
self.model.parameters(),
0.025,
momentum=0.9,
weight_decay=3e-4)
// self.optimizer = torch.optim.Adam(self.model.parameters())
self.scheduler = torch.optim.lr_scheduler.CosineAnnealingLR(self.optimizer, max_iter_num)
for epoch in range(max_iter_num):
self.scheduler.step()
self._train()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: jhfjhfj1/autokeras
Commit Name: 21994919156aac15558f77555538346fb702bcbc
Time: 2018-11-26
Author: jhfjhfj1@gmail.com
File Name: autokeras/nn/model_trainer.py
Class Name: ModelTrainer
Method Name: train_model
Project Name: ultralytics/yolov3
Commit Name: a722601ef61149cc9e5135f58c762310627c970a
Time: 2018-09-20
Author: glenn.jocher@ultralytics.com
File Name: train.py
Class Name:
Method Name: main