a0b36a485bfe99ebf258c23057e1d8a602e9e7b2,train.py,,collate_fn,#Any#,126

Before Change


        frame_positions = np.array(
            [_pad(np.arange(1, len(x[1]) // r + 1), max_target_len // r)
             for x in batch], dtype=np.int)
        frame_positions = torch.LongTensor(frame_positions)
    else:
        s, e = 1, max_target_len // r + 1
        if b_pad > 0:
            s, e = s - 1, e - 1

After Change


    // done flags
    done = np.array([_pad(np.zeros(len(x[1]) // r - 1), max_target_len // r, constant_values=1)
                     for x in batch])
    done = torch.FloatTensor(done)

    return x_batch, input_lengths, mel_batch, y_batch, (text_positions, frame_positions), done

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: r9y9/deepvoice3_pytorch
Commit Name: a0b36a485bfe99ebf258c23057e1d8a602e9e7b2
Time: 2017-11-03
Author: zryuichi@gmail.com
File Name: train.py
Class Name:
Method Name: collate_fn


Project Name: rusty1s/pytorch_geometric
Commit Name: 37847c77889e39143034af9fe0d4b92bc74e992a
Time: 2018-03-02
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/datasets/utils/ply.py
Class Name:
Method Name: read_ply


Project Name: rusty1s/pytorch_geometric
Commit Name: d8a075668b6e9cdf4c08f6c7285e5c7d2fbf5332
Time: 2017-10-17
Author: matthias.fey@tu-dortmund.de
File Name: torch_geometric/graph/geometry.py
Class Name:
Method Name: edges_from_faces