I'm looking into making Audio GANs and this implementation seems really promising, clear and cool. But trying to run it, I ran into a really confusing error message:
Traceback (most recent call last):
File "train_wavegan.py", line 110, in <module>
sample_size=args['sample_size'])
File "C:\Users\Admin\Documents\GitHub\wavegantorch\wgan.py", line 194, in train_wgan
lmbda, use_cuda, compute_grads=True)
File "C:\Users\Admin\Documents\GitHub\wavegantorch\wgan.py", line 33, in compute_discr_loss_terms
D_real.backward(neg_one)
File "C:\Users\Admin\Anaconda3\envs\minimum\lib\site-packages\torch\tensor.py", line 93, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph)
File "C:\Users\Admin\Anaconda3\envs\minimum\lib\site-packages\torch\autograd\__init__.py", line 90, in backward
allow_unreachable=True) # allow_unreachable flag
RuntimeError: invalid gradient at index 0 - expected shape [] but got [1]
Hi,
I'm looking into making Audio GANs and this implementation seems really promising, clear and cool. But trying to run it, I ran into a really confusing error message:
Is this some API change in torch? Any ideas for a fix?