fd723d719ddb49b66a5084215343de763a40083d,trainer.py,Trainer,train_one_epoch,#Trainer#,154

Before Change



            // print to screen
            if i % self.print_freq == 0:
                print(
                    "Epoch: [{0}][{1}/{2}]\t"
                    "Time: {batch_time.val:.3f} ({batch_time.avg:.3f})\t"
                    "Train Loss: {loss.val:.4f} ({loss.avg:.4f})\t"
                    "Train Acc: {acc.val:.3f} ({acc.avg:.3f})".format(
                        epoch, i, len(self.train_loader),
                        batch_time=batch_time, loss=losses, acc=accs)
                )

        // log to tensorboard
        if self.use_tensorboard:
            log_value("train_loss", losses.avg, epoch)

After Change


                pbar.set_description(
                    (
                        "{:.1f}s - loss: {:.3f} - acc: {:.3f}".format(
                            (toc-tic), loss.data[0], acc.data[0]
                            )
                    )
                )
                pbar.update(self.batch_size)

            // log to tensorboard
            if self.use_tensorboard:
                log_value("train_loss", losses.avg, epoch)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: fd723d719ddb49b66a5084215343de763a40083d
Time: 2018-01-23
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: train_one_epoch


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: fd723d719ddb49b66a5084215343de763a40083d
Time: 2018-01-23
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: validate


Project Name: suragnair/alpha-zero-general
Commit Name: 9a162c34649aae4c37391c85e75f1de297f98712
Time: 2017-12-03
Author: suragnair@hotmail.com
File Name: Coach.py
Class Name: Coach
Method Name: learn