48718d7ce74f712da881e9585d66a8e0d54e7004,pl_examples/domain_templates/computer_vision_fine_tuning.py,TransferLearningModel,training_step,#TransferLearningModel#Any#Any#,261

Before Change


        self.train_acc(y_logits, y_true)

        // 3. Outputs:
        tqdm_dict = {"train_loss": train_loss}
        self.log_dict(tqdm_dict, prog_bar=True)
        return {"loss": train_loss}

    def training_epoch_end(self, outputs):

After Change


        train_loss = self.loss(y_logits, y_true)

        // 3. Compute accuracy:
        self.log("train_acc", self.train_acc(y_logits, y_true.int()), prog_bar=True)

        return train_loss
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 2

Instances


Project Name: williamFalcon/pytorch-lightning
Commit Name: 48718d7ce74f712da881e9585d66a8e0d54e7004
Time: 2021-01-08
Author: thomas@grid.ai
File Name: pl_examples/domain_templates/computer_vision_fine_tuning.py
Class Name: TransferLearningModel
Method Name: training_step


Project Name: williamFalcon/pytorch-lightning
Commit Name: 48718d7ce74f712da881e9585d66a8e0d54e7004
Time: 2021-01-08
Author: thomas@grid.ai
File Name: pl_examples/domain_templates/computer_vision_fine_tuning.py
Class Name: TransferLearningModel
Method Name: validation_step


Project Name: NVIDIA/OpenSeq2Seq
Commit Name: 17cbc0eac4a9efc8f11d05a9e0f68ea6d19521f3
Time: 2018-08-09
Author: vnoroozi@nvidia.com
File Name: example_configs/text2text/en-de/en-de-convs2s_plus.py
Class Name:
Method Name: