ed2a46e8c254dde364b760de8357ebf46fe392b6,inferno/trainers/basic.py,Trainer,train_for,#Trainer#Any#Any#,1430
Before Change
// Update state from model"s state hooks
self.update_state_from_model_state_hooks()
// Update parameters
self.optimizer.step()
// Call callback
self.callbacks.call(self.callbacks.END_OF_TRAINING_ITERATION,
iteration_num=iteration_num)
// Prepare for next iteration
After Change
self.update_state("training_loss", thu.unwrap(loss))
// Update state from model"s state hooks
self.update_state_from_model_state_hooks()
if iteration_num % self.backprop_every == 0:
// Update parameters
self.optimizer.step()
// Zero out the grads
self.optimizer.zero_grad()
// Call callback
self.callbacks.call(self.callbacks.END_OF_TRAINING_ITERATION,
iteration_num=iteration_num)
// Prepare for next iteration
self.next_iteration()
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 6
Instances Project Name: inferno-pytorch/inferno
Commit Name: ed2a46e8c254dde364b760de8357ebf46fe392b6
Time: 2020-03-17
Author: valentyna.zinchenko@embl.de
File Name: inferno/trainers/basic.py
Class Name: Trainer
Method Name: train_for
Project Name: facebookresearch/Horizon
Commit Name: d84788c6b7fe218353c35348ec19a276a7f50b42
Time: 2020-09-19
Author: czxttkl@fb.com
File Name: reagent/training/ranking/seq2slate_trainer.py
Class Name: Seq2SlateTrainer
Method Name: train
Project Name: facebookresearch/Horizon
Commit Name: f42595df8d67f6164b779d41fd6be4bb989df9d1
Time: 2020-09-22
Author: czxttkl@fb.com
File Name: reagent/training/ranking/seq2slate_tf_trainer.py
Class Name: Seq2SlateTeacherForcingTrainer
Method Name: train
Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: 32d866746ebfeedc4a30eb36b8ad4dd482da6a78
Time: 2017-12-25
Author: max.lapan@gmail.com
File Name: ch11/02_a3c_grad.py
Class Name:
Method Name:
Project Name: dpressel/mead-baseline
Commit Name: 1f8ddd6d1c71fc2d08999e0e49193ffc269c86d7
Time: 2019-10-25
Author: dpressel@gmail.com
File Name: python/baseline/pytorch/tagger/train.py
Class Name: TaggerTrainerPyTorch
Method Name: _train