209b830f5f6ce1c28e207f46e68f4c431fb71820,torchsample/modules/module_trainer.py,ModuleTrainer,evaluate,#ModuleTrainer#Any#Any#Any#Any#Any#,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": 0.}
        
        if self._has_metrics:
            metric_container = MetricContainer(self._metrics, prefix="val_")
            metric_container.set_helper(evaluate_helper)

        samples_seen = 0
        for batch_idx in range(num_batches):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

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: ncullen93/torchsample
Commit Name: ef2be6e6d06e153141acdbd44e54405fe1dc2c4a
Time: 2017-07-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: compile