Hi,
I am very interested in the codes. But when I run train.py, I got a runtime error, which is listed below:
preprocessed data was found and loaded
Traceback (most recent call last):
File "train.py", line 59, in
cross_entropy, kld, coef = train_step(iteration, args.batch_size, args.use_cuda, args.dropout)
File "/shared/data/mengqu2/projects/rvae/model/rvae.py", line 113, in train
loss.backward()
File "/home/mengqu2/.local/lib/python3.5/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/mengqu2/.local/lib/python3.5/site-packages/torch/autograd/init.py", line 99, in backward
variables, grad_variables, retain_graph)
RuntimeError: invalid argument 1: the number of sizes provided must be greater or equal to the number of dimensions in the tensor at /pytorch/torch/lib/THC/generic/THCTensor.c:309
Could you help fix the problem?
Thank you so much!
Hi, I am very interested in the codes. But when I run train.py, I got a runtime error, which is listed below:
preprocessed data was found and loaded Traceback (most recent call last): File "train.py", line 59, in
cross_entropy, kld, coef = train_step(iteration, args.batch_size, args.use_cuda, args.dropout)
File "/shared/data/mengqu2/projects/rvae/model/rvae.py", line 113, in train
loss.backward()
File "/home/mengqu2/.local/lib/python3.5/site-packages/torch/autograd/variable.py", line 167, in backward
torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables)
File "/home/mengqu2/.local/lib/python3.5/site-packages/torch/autograd/init.py", line 99, in backward
variables, grad_variables, retain_graph)
RuntimeError: invalid argument 1: the number of sizes provided must be greater or equal to the number of dimensions in the tensor at /pytorch/torch/lib/THC/generic/THCTensor.c:309
Could you help fix the problem? Thank you so much!