tinyvision / SOLIDER

A Semantic Controllable Self-Supervised Learning Framework to learn general human representations from massive unlabeled human images, which can benefit downstream human-centric tasks to the maximum extent
Apache License 2.0
1.92k stars 346 forks source link

IndexError: tensors used as indices must be long, byte or bool tensors #12

Open Peter-jj opened 1 year ago

Peter-jj commented 1 year ago

when I run the resume_solider.sh,it maybe traceback with File "main_solider.py", line 398, in train_one_epoch semantic_weight = [torch.cat(semantic_weight)[torch.from_numpy(mask_idxs)]] \ IndexError: tensors used as indices must be long, byte or bool tensors how can I deal with it

debenton commented 12 months ago

Hi authors - the code is not finetunable when mask_ids is empty - can you give a pointer on what to do? I tried indenting that line and got a tensor size mismatch error (16 vs. 8).