// 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)