ed2a46e8c254dde364b760de8357ebf46fe392b6,inferno/trainers/basic.py,Trainer,train_for,#Trainer#Any#Any#,1430
Before Change
self.callbacks.call(self.callbacks.BEGIN_OF_TRAINING_ITERATION,
iteration_num=iteration_num)
// Zero out the grads
self.optimizer.zero_grad()
// No interrupts while computing - a SIGINT could shoot down the driver if
// done at the wrong time. Not sure if this has something to do with pinned memory
with pyu.delayed_keyboard_interrupt():
// Get batch
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: 3
Non-data size: 5
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: 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: ultralytics/yolov3
Commit Name: 6e5da1ce274abf9d22815eac04ae6aa16a2209b8
Time: 2018-11-05
Author: glenn.jocher@ultralytics.com
File Name: train.py
Class Name:
Method Name: main