-
Notifications
You must be signed in to change notification settings - Fork 209
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
Prediction and target not the same shape #624
Comments
Hi @sam-j-hall , Let me know, if this helps to solve the issue.| Best, |
Hi @Stefaanhess, Thank you for you help, I tried changing the dimension of the
|
Hi @sam-j-hall, it seems like currently removing the mean only works for properties of shape I suggest you just try to set |
Hi @Stefaanhess, I have managed to get it working now as I did not need to use Thank you for your help |
Hi,
I am trying to set up ML model with Schnetpack to predict x-ray spectroscopy and have set up a initial basic model in order to get things working before improving. However, I am having some trouble with the prediction and target tensors not being the same shape, with the problem being that the prediction tensor shape seems to be changing and I can't seem to figure out or understand what is going on?
The error message I get is
Predictions and targets are expected to have the same shape, but got torch.Size([1, 200]) and torch.Size([200])
What I don't understand is why the prediction shape is [1,200], because the data that I have loaded in the dataset has a shape [200] (as seen when I print the dataset keys under Spectrum).
The problem occurs when calculating the validation error, which I am also confused about because during training I get the same
UserWarning
about the different shapes but somehow the code does not stop here. I have attached my files of my code here for you to have a look and see if there is anything I am doing wrong that is causing this and what the fix would be.Thanks
files.zip
The text was updated successfully, but these errors were encountered: