wgan-gp
wgan-gp copied to clipboard
D_real.backward(mone) RuntimeError: invalid gradient at index 0 - expected shape [] but got [1]
while training wgan-gp i got this error. can you help to sove this . thanks in ADVANCE
had the same issue. You need to make one a scalar not array. Try one = torch.ones([])
use
D_real = D_real.mean().unsqueeze(0)
I have the same issue. could you tell me how to do
@ramesh720 Hi, I have the same issue. could you tell me how to do
use
one = torch.tensor(1, dtype=torch.float)
mone = one * -1