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

kpms.fit_pca error #281

Open
CoderYangQi opened this issue Nov 7, 2024 · 1 comment
Open

kpms.fit_pca error #281

CoderYangQi opened this issue Nov 7, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@CoderYangQi
Copy link

##Hi, thanks for your code! When I run the code(docs\keypoint_moseq_colab.ipynb) with dlc_example_project, I got the error in kpms.fit_pca. Could you help me?:

File "D:\USERS\yq\code\MotionTracking\keypoint-moseq\YQScripts\colabTest.py", line 63, in
pca = kpms.fit_pca(**data, **config())
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 312, in fit_pca
Y_flat = preprocess_for_pca(
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 388, in preprocess_for_pca
Y_aligned, v, h = align_egocentric(Y, anterior_idxs, posterior_idxs)
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 429, in align_egocentric
Y_aligned = inverse_rigid_transform(Y, v, h)
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 172, in inverse_rigid_transform
return apply_rotation(Y - v[..., na, :], -h)
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_moseq\models\keypoint_slds\alignment.py", line 214, in apply_rotation
return jnp.einsum("...kj,...ij->...ki", Y, rot_matrix)
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\jax_src\numpy\lax_numpy.py", line 2923, in einsum
operands, contractions = contract_path(
File "d:\Tools\Anaconda_envs\envs\keypoint_moseq\lib\site-packages\opt_einsum\contract.py", line 324, in contract_path
raise ValueError(
ValueError: Size of label 'd' for operand 1 (70) does not match previous terms (10030).

Your Environment

  • Version/GitHub branch used:
  • Device: GPU 3090
  • OS: Windows Python3.9 (conda install, window-gpu)
  • Link to your project:
@CoderYangQi CoderYangQi added the bug Something isn't working label Nov 7, 2024
@calebweinreb
Copy link
Collaborator

Hi,

This is the repo for depth MoSeq... Issues related to keypoint moseq should be raised here https://github.com/dattalab/keypoint-moseq

Also, the colab notebook is mostly meant for google colab. I would follow the tutorial if working on your own computer. To debug this, I would recommend running the colab notebook on google colab. The error shouldn't occur there, and then you check if there was some issue with ho you loaded the data which produced the error above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants