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

[Model Evaluation] Encountering IndexError When Running run_umt_pretraining.py on a New Dataset #48

Open
kaizhuanren opened this issue Aug 25, 2024 · 2 comments

Comments

@kaizhuanren
Copy link

I am attempting to evaluate your model's performance on a brand new dataset by running the run_umt_pretraining.py script. I have only modified the datapath and batch_size parameters to match my dataset and hardware specifications, while keeping all other parameters at their default values. However, I encountered an error during execution. The specific error message and stack trace are as follows:
Traceback (most recent call last):
File "unmasked_teacher-main/single_modality/run_umt_pretraining.py", line 346, in
main(opts)
File "unmasked_teacher-main/single_modality/run_umt_pretraining.py", line 303, in main
train_stats = train_one_epoch(
File "unmasked_teacher-main/single_modality/engines/engine_for_pretraining_umt.py", line 83, in train_one_epoch
targets_clip_vis = norm_clip[~clip_bool_masked_pos].reshape(K, B, -1, C_CLIP)
IndexError: The shape of the mask [1, 8, 1568] at index 2 does not match the shape of the indexed tensor [1, 8, 3136, 512] at index 2

norm_clip is theoretically the output after feature extraction. Why does it not match with clip_bool_masked_pos formed by attn.shape

@Andy1621
Copy link
Collaborator

Hi! Please give the full script you used.

@kaizhuanren
Copy link
Author

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