209b830f5f6ce1c28e207f46e68f4c431fb71820,torchsample/modules/module_trainer.py,ModuleTrainer,evaluate,#ModuleTrainer#,462
Before Change
samples_seen += batch_size
eval_logs["val_loss"] = (samples_seen*eval_logs["val_loss"] + loss.data[0]*batch_size) / (samples_seen+batch_size)
if self._in_train_loop:
return eval_logs
else:
return eval_logs["val_loss"]
self.model.train(mode=True)
def evaluate_loader(self,
loader,
After Change
eval_logs["val_loss"] = (samples_seen*eval_logs["val_loss"] + loss.data[0]*batch_size) / (samples_seen+batch_size)
if self._has_metrics:
metric_container.reset()
metrics_logs = metric_container(output_batch, target_batch)
eval_logs.update(metrics_logs)
self.model.train(mode=True)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: ncullen93/torchsample
Commit Name: 209b830f5f6ce1c28e207f46e68f4c431fb71820
Time: 2017-07-21
Author: recastrodiaz@gmail.com
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: evaluate
Project Name: ncullen93/torchsample
Commit Name: 209b830f5f6ce1c28e207f46e68f4c431fb71820
Time: 2017-07-21
Author: recastrodiaz@gmail.com
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: evaluate_loader
Project Name: openai/gym
Commit Name: f37830bbe2c85f613fded1721976dbe94f6bed0b
Time: 2019-03-22
Author: martin.delagorce@gmail.com
File Name: gym/utils/play.py
Class Name:
Method Name: play