Traceback (most recent call last):
File "D:\Prongs Project\tfvaegan-master\train_images.py", line 172,in<module>
criticD_real.backward(mone)
File "D:\Anaconda\envs\pyt11\lib\site-packages\torch\_tensor.py", line 363,in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
File "D:\Anaconda\envs\pyt11\lib\site-packages\torch\autograd\__init__.py", line 166,in backward
grad_tensors_ = _make_grads(tensors, grad_tensors_, is_grads_batched=False)
File "D:\Anaconda\envs\pyt11\lib\site-packages\torch\autograd\__init__.py", line 50,in _make_grads
raise RuntimeError("Mismatch in shape: grad_output["
RuntimeError: Mismatch in shape: grad_output[0] has a shape of torch.Size([1])and output[0] has a shape of torch.Size([]).
print('[%d/%d] Loss_D: %.4f Loss_G: %.4f, Wasserstein_dist:%.4f, vae_loss_seen:%.4f'%(epoch, opt.nepoch, D_cost.data[0], G_cost.data[0], Wasserstein_D.data[0],vae_loss_seen.data[0]),end=" ")
IndexError: invalid index of a 0-dim tensor. Use `tensor.item()` in Python or `tensor.item<T>()` in C++ to convert a 0-dim tensor to a number