Open phdmatamoros opened 1 year ago
When I tried to train wassertein autoencoder , i have this error d_z_loss.backward(-one)
RuntimeError: Mismatch in shape: grad_output[0] has a shape of torch.Size([1]) and output[0] has a shape of torch.Size([]).
I have the exact same error, did you find a solution ?
It seems like replacing
one = torch.tensor([1], dtype=torch.float)
by
one = torch.tensor(1, dtype=torch.float)
works
When I tried to train wassertein autoencoder , i have this error d_z_loss.backward(-one)
RuntimeError: Mismatch in shape: grad_output[0] has a shape of torch.Size([1]) and output[0] has a shape of torch.Size([]).