gan.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:MachineLearning 作者: timomernick 项目源码 文件源码
def test():
    print("testing...")
    fake = generator(fixed_noise).data.cpu().numpy()
    print(fake.shape)

    fake = fake.reshape(-1, sampler.num_memory_channels, sampler.num_history, sampler.memory_size)
    print(fake.shape)

    fake_real = fake[0:,0:1,0:sampler.num_history,0:sampler.memory_size]
    fake_imag = fake[0:,1:2,0:sampler.num_history,0:sampler.memory_size]
    fake = fake_real + 1j * fake_imag
    print(fake.shape)

    fake = fake.reshape(-1, sampler.memory_size)
    print(fake.shape)

    output_wav = stft.istft(fake / spectrogram.spec_norm)
    print(output_wav.shape)

    wavfile.write("test.wav", 8000, output_wav.reshape(-1))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号