00135a70697dc9b4611971e5833e2d84501c3da7,keras/engine/training.py,Model,test_step,#Model#Any#,1188

Before Change


        y, y_pred, sample_weight, regularization_losses=self.losses)

    self.compiled_metrics.update_state(y, y_pred, sample_weight)
    return {m.name: m.result() for m in self.metrics}

  def make_test_function(self):
    Creates a function that executes one step of evaluation.

After Change


        y, y_pred, sample_weight, regularization_losses=self.losses)
    self.compiled_metrics.update_state(y, y_pred, sample_weight)
    // Collect metrics to return
    return_metrics = {}
    for metric in self.metrics:
      result = metric.result()
      if isinstance(result, dict):
        return_metrics.update(result)
      else:
        return_metrics[metric.name] = result
    return return_metrics

  def make_test_function(self):
    Creates a function that executes one step of evaluation.
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: keras-team/keras
Commit Name: 00135a70697dc9b4611971e5833e2d84501c3da7
Time: 2021-03-23
Author: scottzhu@google.com
File Name: keras/engine/training.py
Class Name: Model
Method Name: test_step


Project Name: keras-team/keras
Commit Name: 00135a70697dc9b4611971e5833e2d84501c3da7
Time: 2021-03-23
Author: scottzhu@google.com
File Name: keras/engine/training.py
Class Name: Model
Method Name: train_step


Project Name: descarteslabs/descarteslabs-python
Commit Name: 7541c0d524ebc6151071a7f0bcec0e5e763aa57c
Time: 2020-05-28
Author: 51922948+sdelany2@users.noreply.github.com
File Name: descarteslabs/workflows/models/toplevel.py
Class Name:
Method Name: compute