Graph_Convolutional_LSTM icon indicating copy to clipboard operation
Graph_Convolutional_LSTM copied to clipboard

How to run your code

Open lenhhoxung86 opened this issue 7 years ago • 2 comments

Hello, I tried running your code but it was not successful. python Main.py Here is the detail error:

Epoch 0/0
----------
Traceback (most recent call last):
  File "Main.py", line 93, in <module>
    rnn, rnn_loss = TrainRNN(train_dataloader, valid_dataloader, num_epochs = 1)
  File "/home/tiendh/Projects/IoT++/Graph_Convolutional_LSTM/Train_Validate.py", line 72, in TrainRNN
    loss_train = loss_MSE(outputs, labels)
  File "/home/tiendh/deeplearning_env/lib/python3.5/site-packages/torch/nn/modules/module.py", line 477, in __call__
    result = self.forward(*input, **kwargs)
  File "/home/tiendh/deeplearning_env/lib/python3.5/site-packages/torch/nn/modules/loss.py", line 421, in forward
    return F.mse_loss(input, target, reduction=self.reduction)
  File "/home/tiendh/deeplearning_env/lib/python3.5/site-packages/torch/nn/functional.py", line 1716, in mse_loss
    return _pointwise_loss(lambda a, b: (a - b) ** 2, torch._C._nn.mse_loss, input, target, reduction)
  File "/home/tiendh/deeplearning_env/lib/python3.5/site-packages/torch/nn/functional.py", line 1674, in _pointwise_loss
    return lambd_optimized(input, target, reduction)
RuntimeError: input and target shapes do not match: input [40 x 323], target [40 x 1 x 323] at /pytorch/aten/src/THCUNN/generic/MSECriterion.cu:12

Actually, I had to enable the line train_dataloader, valid_dataloader, test_dataloader, max_speed = PrepareDataset(speed_matrix) to pass the very first error. Am I doing something wrong? Please guide me how to run your code.

lenhhoxung86 avatar Nov 21 '18 09:11 lenhhoxung86

Actually, I am troubled by the same problem. What's your pytorch version? Mine is 1.6. I am not sure whether the problem came from pytorch version unmarching?

WuyuOfUSTC avatar Sep 08 '19 15:09 WuyuOfUSTC

Actually, I am troubled by the same problem. What's your pytorch version? Mine is 1.6. I am not sure whether the problem came from pytorch version unmarching?

I also face to the same problem, and I use the pytorch 0.4 and pytorch 1.4, there will be bugs... If you solve this problem, can you tell me?

MasterWall avatar Jul 27 '20 00:07 MasterWall