Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to run your code #1

Open
lenhhoxung86 opened this issue Nov 21, 2018 · 2 comments
Open

How to run your code #1

lenhhoxung86 opened this issue Nov 21, 2018 · 2 comments

Comments

@lenhhoxung86
Copy link

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.

@WuyuOfUSTC
Copy link

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?

@MasterWall
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants