kefirski / pytorch_RVAE

Recurrent Variational Autoencoder that generates sequential data implemented with pytorch
MIT License
357 stars 87 forks source link

Error while running train.py #10

Closed ghost closed 6 years ago

ghost commented 6 years ago

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 "/home/tonygrey/pytorch_RVAE/model/rvae.py", line 113, in train loss.backward() File "/home/tonygrey/miniconda3/lib/python3.6/site-packages/torch/autograd/variable.py", line 167, in backward torch.autograd.backward(self, gradient, retain_graph, create_graph, retain_variables) File "/home/tonygrey/miniconda3/lib/python3.6/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 /opt/conda/conda-bld/pytorch_1518243271935/work/torch/lib/THC/generic/THCTensor.c:326