0a8e27413d721bf8d753e5e6061cc24f5bf6474f,tests/test_model.py,,test_local_conditioning_correctness,#,146
Before Change
assert model.local_conditioning_enabled()
assert not model.has_speaker_embedding()
x = Variable(torch.from_numpy(x).contiguous())
x = x.cuda() if use_cuda else x
c = Variable(torch.from_numpy(c).contiguous())
c = c.cuda() if use_cuda else c
print(x.size(), c.size())
model.eval()
y_offline = model(x, c=c, softmax=True)
// Incremental forward with forced teaching
y_online = model.incremental_forward(
test_inputs=x, c=c, T=None, tqdm=tqdm, softmax=True, quantize=False)
// (1 x C x T)
c = (y_offline - y_online).abs()
print(c.mean(), c.max())
try:
After Change
assert model.local_conditioning_enabled()
assert not model.has_speaker_embedding()
x = torch.from_numpy(x).contiguous().to(device)
c = torch.from_numpy(c).contiguous().to(device)
print(x.size(), c.size())
model.eval()
y_offline = model(x, c=c, softmax=True)
// Incremental forward with forced teaching
y_online = model.incremental_forward(
test_inputs=x, c=c, T=None, tqdm=tqdm, softmax=True, quantize=False)
// (1 x C x T)
c = (y_offline - y_online).abs()
print(c.mean(), c.max())
try:
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 10
Instances
Project Name: r9y9/wavenet_vocoder
Commit Name: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_local_conditioning_correctness
Project Name: r9y9/wavenet_vocoder
Commit Name: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_global_conditioning_with_embedding_correctness
Project Name: r9y9/wavenet_vocoder
Commit Name: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_local_conditioning_correctness
Project Name: r9y9/wavenet_vocoder
Commit Name: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
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: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_global_and_local_conditioning_correctness
Project Name: r9y9/wavenet_vocoder
Commit Name: 0a8e27413d721bf8d753e5e6061cc24f5bf6474f
Time: 2018-05-04
Author: zryuichi@gmail.com
File Name: tests/test_model.py
Class Name:
Method Name: test_local_conditioning_upsample_correctness