fd723d719ddb49b66a5084215343de763a40083d,trainer.py,Trainer,validate,#Trainer#,247

Before Change


            batch_time.update(toc-tic)

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

        print("[*] Valid Acc: {acc.avg:.3f}".format(acc=accs))

        // log to tensorboard
        if self.use_tensorboard:

After Change


                            (toc-tic), loss.data[0], acc.data[0])
                    )
                )
                pbar.update(self.batch_size)

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

Frequency: 3

Non-data size: 6

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: validate


Project Name: xinntao/BasicSR
Commit Name: 23a45d5eb839c763c94c0e413ad599d9f9b5e184
Time: 2018-09-06
Author: wxt1994@126.com
File Name: codes/scripts/create_lmdb.py
Class Name:
Method Name:


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