runtime error when running toy example
Traceback (most recent call last):
File "train.py", line 614, in
I dont encounter such problem. Can you put a breakpoint at line 290 and tell me the size of tensors: h , s & z ? They should be 128x64, 128x64 and 128x32 respectively.
Traceback (most recent call last): File "train.py", line 614, in test(128, write_to_file=wr_dir, just_one=True) File "train.py", line 533, in test pred_hat_4d = predict(obsv, noise, n_next) File "train.py", line 374, in predict new_v = decoder(encoder.lstm_h[0].view(bs, -1), weighted_features, noise).view(bs, 2) File "/home/yuanfu/workspace/socialways/env/lib/python3.5/site-packages/torch/nn/modules/module.py", line 491, in call result = self.forward(*input, **kwargs) File "train.py", line 290, in forward inp = torch.cat([h, s, z], dim=1) RuntimeError: invalid argument 0: Tensors must have same number of dimensions: got 2 and 1 at /pytorch/aten/src/THC/generic/THCTensorMath.cu:102
Excuse me,I encounter the same problem when I use the seq_hotel dataset. Have you solved this problem, please?
@Dear-zhangliyuan Hi Liyuan, thanks for reporting this issue, I found out this bug was due to some special case in the dataset, anyway I fixed it, and now you should be able to train on hotel dataset. https://github.com/amiryanj/socialways/commit/80c0209af7ba3c977d4e463db4d24aeb07874e9c
@Dear-zhangliyuan Hi Liyuan, thanks for reporting this issue, I found out this bug was due to some special case in the dataset, anyway I fixed it, and now you should be able to train on hotel dataset. 80c0209
Yes, it is really work now. You are so great! ! Thanks very much!!
hello javad, I used the hotel dataset to train yesterday, it can work. But I run the visualize.py today, I found it can't work normally. And the zara01 dataset can't also visualize. Besides,When I train use the zara02, it has a huge loss. I hope that you can help me debug it if you are convenient. Thanks!