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

Nueral response prediction error #153

Open
shanggao11 opened this issue Sep 10, 2024 · 2 comments
Open

Nueral response prediction error #153

shanggao11 opened this issue Sep 10, 2024 · 2 comments

Comments

@shanggao11
Copy link

Hi there!
May I ask a question about the neural response prediction part?
I have a neural response array in firing rate (FRarray)along with camera stamps and neural stamps; both camera stamps(CSarray) and neural stamps(NSarray) are in frames. NSarray.shape==FRarray.shape(if ignore the number of neurons); CSarray.shape match with the input video frames (I input a 5 mins data, but the facemap only read in 4.2 mins data, I tried both the size of 5 and 4.2 mins); It gave me this error when I run the neural response prediction, Please help me about this, thank you very much!:

at non-singleton dimension 1
pose data shape (3, 15, 50531)
xy.shape (50531, 15, 2)
outlier filter shape (50531, 15, 2)
x.shape (50531, 30)
Neural target shape: (300002, 10)
Keypoints shape: (50531, 30)
Inputs: (50531, 30)
Neural: (300002, 10)
Using lr, n_iter, weight_decay: 0.001 300 0.0001
Ignoring window icon 4534162 exceeds maximum xcb request length 4194303
Ignoring window icon 4534162 exceeds maximum xcb request length 4194303
Traceback (most recent call last):
File "/home/isocortex/miniconda3/envs/facemap/lib/python3.8/site-packages/facemap/gui/neural_activity_window.py", line 537, in
lambda clicked: self.run_neural_predictions(clicked, dialog)
File "/home/isocortex/miniconda3/envs/facemap/lib/python3.8/site-packages/facemap/gui/neural_activity_window.py", line 653, in run_neural_predictions
) = prediction_utils.get_keypoints_to_neural_varexp(
File "/home/isocortex/miniconda3/envs/facemap/lib/python3.8/site-packages/facemap/neural_prediction/prediction_utils.py", line 448, in get_keypoints_to_neural_varexp
) = model.train_model(
File "/home/isocortex/miniconda3/envs/facemap/lib/python3.8/site-packages/facemap/neural_prediction/neural_model.py", line 184, in train_model
loss = ((y_pred - Y_train[i][n].unsqueeze(0)) ** 2).mean()
RuntimeError: The size of tensor a (4503) must match the size of tensor b (22500) at non-singleton dimension 1

@Atika-Syeda
Copy link
Collaborator

Hi @shanggao11 can you please confirm if you also load the camera and neural stamps when you run the prediction?

@shanggao11
Copy link
Author

Hi @shanggao11 can you please confirm if you also load the camera and neural stamps when you run the prediction?

Thanks for your reply! yes,i am sure that I load the camera and neural stamps.

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

2 participants