b03b53b426deaa8bdf6c93d91e424c5571acf7e5,fairseq/data.py,,_make_batches,#Any#Any#Any#Any#Any#Any#Any#Any#,285

Before Change


    sample_len = 0
    ignored = []
    for idx in map(int, indices):
        if not _valid_size(src.sizes[idx], dst.sizes[idx], max_positions):
            if ignore_invalid_inputs:
                ignored.append(idx)
                continue

After Change


    for idx in map(int, indices):
        src_size = src.sizes[idx]
        dst_size = dst.sizes[idx] if dst else src_size
        if not _valid_size(src_size, dst_size, max_positions):
            if ignore_invalid_inputs:
                ignored.append(idx)
                continue
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: pytorch/fairseq
Commit Name: b03b53b426deaa8bdf6c93d91e424c5571acf7e5
Time: 2018-03-05
Author: edunov@apache.org
File Name: fairseq/data.py
Class Name:
Method Name: _make_batches


Project Name: elbayadm/attn2d
Commit Name: 2f781c5a16b05221c54094e1fb44e9692c1e433d
Time: 2017-11-08
Author: myleott@fb.com
File Name: fairseq/data.py
Class Name:
Method Name: batches_by_size