0c61ec3d488c21cabe2508dbb525ec487eba2ba8,torchbenchmark/models/demucs/__init__.py,Model,eval,#Model#Any#,65

Before Change


    def eval(self, niter=1):
        // TODO: implement the eval version
        for _ in range(niter):
            streams, = self.example_inputs
            streams = streams.to(self.device)
            sources = streams[:, 1:]
            sources = self.augment(sources)
            mix = sources.sum(dim=1)

            estimates = self.model(mix)
            sources = center_trim(sources, estimates)
            loss = self.criterion(estimates, sources)

    def train(self, niter=1):

After Change


    def eval(self, niter=1):
        // TODO: implement the eval version
        for _ in range(niter):
            sources, estimates = self.model(*self.example_inputs)
            sources = center_trim(sources, estimates)
            loss = self.criterion(estimates, sources)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: pytorch/benchmark
Commit Name: 0c61ec3d488c21cabe2508dbb525ec487eba2ba8
Time: 2021-02-07
Author: jansel@fb.com
File Name: torchbenchmark/models/demucs/__init__.py
Class Name: Model
Method Name: eval


Project Name: pytorch/benchmark
Commit Name: 0c61ec3d488c21cabe2508dbb525ec487eba2ba8
Time: 2021-02-07
Author: jansel@fb.com
File Name: torchbenchmark/models/demucs/__init__.py
Class Name: Model
Method Name: train


Project Name: kevinzakka/recurrent-visual-attention
Commit Name: f466871be6ee80533c997cf6c958aa41a697936f
Time: 2018-01-22
Author: kevinarmandzakka@gmail.com
File Name: trainer.py
Class Name: Trainer
Method Name: train_one_epoch