825cfa0ce2d29ce7e42ad38f6c068c051bc3e940,tools/test.py,,single_test,#Any#Any#Any#,14

Before Change


def single_test(model, data_loader, show=False):
    model.eval()
    results = []
    prog_bar = mmcv.ProgressBar(len(data_loader.dataset))
    for i, data in enumerate(data_loader):
        with torch.no_grad():
            result = model(return_loss=False, rescale=not show, **data)
        results.append(result)

After Change


    model.eval()
    results = []
    dataset = data_loader.dataset
    prog_bar = mmcv.ProgressBar(len(dataset))
    for i, data in enumerate(data_loader):
        with torch.no_grad():
            result = model(return_loss=False, rescale=not show, **data)
        results.append(result)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: open-mmlab/mmdetection
Commit Name: 825cfa0ce2d29ce7e42ad38f6c068c051bc3e940
Time: 2018-12-11
Author: chenkaidev@gmail.com
File Name: tools/test.py
Class Name:
Method Name: single_test


Project Name: autoreject/autoreject
Commit Name: a9b7436594414f8522419a1508b884f025bf9d4f
Time: 2016-05-25
Author: mainakjas@gmail.com
File Name: autoreject/autoreject.py
Class Name: ConsensusAutoReject
Method Name: _interpolate_bad_epochs


Project Name: SpiNNakerManchester/sPyNNaker
Commit Name: 7c740693a11972039d42ace8ed66e8de6e7452dc
Time: 2017-06-23
Author: donal.k.fellows@manchester.ac.uk
File Name: spynnaker/pyNN/overridden_pacman_functions/spynnaker_data_specification_writer.py
Class Name: SpynnakerDataSpecificationWriter
Method Name: __call__