201df9a84a2585537e0b7f1db4b97244bc7a4e2d,autokeras/hypermodels/heads.py,ClassificationHead,__init__,#ClassificationHead#Any#Any#Any#Any#Any#,39

Before Change


        if not self.metrics:
            self.metrics = ["accuracy"]
        self.dropout_rate = dropout_rate
        self.set_loss()

    def set_loss(self):
        if not self.num_classes:
            return

After Change


        self.dropout_rate = dropout_rate
        if metrics is None:
            metrics = ["accuracy"]
        if loss is None:
            loss = self.infer_loss()
        super().__init__(loss=loss,
                         metrics=metrics,
                         **kwargs)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: keras-team/autokeras
Commit Name: 201df9a84a2585537e0b7f1db4b97244bc7a4e2d
Time: 2020-05-30
Author: jin@tamu.edu
File Name: autokeras/hypermodels/heads.py
Class Name: ClassificationHead
Method Name: __init__


Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: __init__