102123eef25500a39160412eca7e8cb9f53104a6,trainer/trainer.py,Trainer,_valid_epoch,#Trainer#Any#,94

Before Change



        return {
            "val_loss": total_val_loss / len(self.valid_data_loader),
            "val_metrics": (total_val_metrics / len(self.valid_data_loader)).tolist()
        }

    def _progress(self, batch_idx):
        base = "[{}/{} ({:.0f}%)]"

After Change


                self.writer.set_step((epoch - 1) * len(self.valid_data_loader) + batch_idx, "valid")
                self.valid_metrics.update("loss", loss.item())
                for met in self.metric_ftns:
                    self.valid_metrics.update(met.__name__, met(output, target))
                self.writer.add_image("input", make_grid(data.cpu(), nrow=8, normalize=True))

        // add histogram of model parameters to the tensorboard
        for name, p in self.model.named_parameters():
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: victoresque/pytorch-template
Commit Name: 102123eef25500a39160412eca7e8cb9f53104a6
Time: 2019-09-10
Author: SunQ0313@gmail.com
File Name: trainer/trainer.py
Class Name: Trainer
Method Name: _valid_epoch


Project Name: stanfordnmbl/osim-rl
Commit Name: 0c4fdbc63120b4136041cf0f53b8fd804732aa82
Time: 2019-05-12
Author: ssm0445@gmail.com
File Name: osim/env/osim.py
Class Name: L2M2019Env
Method Name: get_state_desc


Project Name: victoresque/pytorch-template
Commit Name: 102123eef25500a39160412eca7e8cb9f53104a6
Time: 2019-09-10
Author: SunQ0313@gmail.com
File Name: trainer/trainer.py
Class Name: Trainer
Method Name: _train_epoch