6e6c12425a787d8c954ce5c31ceed59cdd531001,kraken/lib/ctc_decoder.py,,greedy_decoder,#Any#,48

Before Change


    m = np.argmax(outputs, 0)
    start = None
    x = []
    for i in range(len(m)):
        if start is None and dec[i] != 0 and (not (i > 0 and dec[i-1] == dec[i])):
            start = i
            code = dec[i]
        if start is not None and (dec[i-1] != dec[i]):
            x.append((code, start, i , val[start:i+1].max().data[-1]))
            start = None
    return x

def blank_threshold_decoder(outputs, threshold=0.5):
    

After Change


    seq_len = outputs.shape[1]
    mask = np.eye(outputs.shape[0], dtype="bool")[labels].T
    classes = []
    for label, group in groupby(zip(np.arange(seq_len), labels, outputs[mask]), key=lambda x: x[1]):
        group = list(group)
        if label != 0:
            classes.append((label, group[0][0], group[-1][0], max(x[2] for x in group)))
    return classes

def blank_threshold_decoder(outputs, threshold=0.5):
    
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 12

Instances


Project Name: mittagessen/kraken
Commit Name: 6e6c12425a787d8c954ce5c31ceed59cdd531001
Time: 2018-05-20
Author: mittagessen@l.unchti.me
File Name: kraken/lib/ctc_decoder.py
Class Name:
Method Name: greedy_decoder


Project Name: mittagessen/kraken
Commit Name: 6e6c12425a787d8c954ce5c31ceed59cdd531001
Time: 2018-05-20
Author: mittagessen@l.unchti.me
File Name: kraken/lib/ctc_decoder.py
Class Name:
Method Name: greedy_decoder


Project Name: pantsbuild/pants
Commit Name: f612f023e0e49c18e8f307a8ba647e02b0fb5cb8
Time: 2015-08-11
Author: fedor.korotkov@gmail.com
File Name: src/python/pants/backend/project_info/tasks/ide_gen.py
Class Name: IdeGen
Method Name: map_external_jars


Project Name: openml/openml-python
Commit Name: 33c3a8101efe1cb66599831c03a6b960248a8718
Time: 2016-03-25
Author: feurerm@informatik.uni-freiburg.de
File Name: openml/datasets/functions.py
Class Name:
Method Name: check_datasets_active