53a7568b6681f3c30fd54753cb4d9b5a2714be27,tests/test_model.py,,test_global_conditioning_correctness,#,125

Before Change


    // condition by mean power
    x, x_org, c = _quantized_test_data(returns_power=True)
    g = c.mean(axis=-1, keepdims=True).astype(np.int)
    model = WaveNet(layers=6, stacks=2, channels=64, gin_channels=16,
                    n_speakers=256)

    x = Variable(torch.from_numpy(x).contiguous())
    x = x.cuda() if use_cuda else x

    g = Variable(torch.from_numpy(g).contiguous())
    g = g.cuda() if use_cuda else g
    print(g.size())

    model.eval()

    y_offline = model(x, g=g, softmax=True)

    // Incremental forward with forced teaching
    y_online = model.incremental_forward(
        test_inputs=x, g=g, T=None, tqdm=tqdm, softmax=True, quantize=False)

    // (1 x C x T)

After Change


    // condition by mean power
    x, x_org, c = _quantized_test_data(returns_power=True)
    g = c.mean(axis=-1, keepdims=True).astype(np.int)
    model = build_compact_model(gin_channels=16, n_speakers=256)

    x = Variable(torch.from_numpy(x).contiguous())
    x = x.cuda() if use_cuda else x

    g = Variable(torch.from_numpy(g).contiguous())
    g = g.cuda() if use_cuda else g
    print(g.size())

    model.eval()

    y_offline = model(x, g=g, softmax=True)

    // Incremental forward with forced teaching
    y_online = model.incremental_forward(
        test_inputs=x, g=g, T=None, tqdm=tqdm, softmax=True, quantize=False)

    // (1 x C x T)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: r9y9/wavenet_vocoder
Commit Name: 53a7568b6681f3c30fd54753cb4d9b5a2714be27
Time: 2018-01-01
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_global_conditioning_correctness


Project Name: r9y9/wavenet_vocoder
Commit Name: 53a7568b6681f3c30fd54753cb4d9b5a2714be27
Time: 2018-01-01
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_incremental_forward_correctness


Project Name: r9y9/wavenet_vocoder
Commit Name: 53a7568b6681f3c30fd54753cb4d9b5a2714be27
Time: 2018-01-01
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_local_conditioning_correctness