You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RuntimeError: Error(s) in loading state_dict for BaseVideoModel: size mismatch for head.out.weight: copying a param with shape torch.Size([400, 768]) from checkpoint, the shape in current model is torch.Size([5, 768]). size mismatch for head.out.bias: copying a param with shape torch.Size([400]) from checkpoint, the shape in current model is torch.Size([5]).
#24
Open
lyxlplhy opened this issue
May 9, 2024
· 1 comment
Hello, I encountered this error while using CHECKPOINT-FILE-PATH: "/yxli/mma/TADAConv main/TADAConv main/tadconvnextv2ttiny-in1k_k400_79.6. pyth" to load my own dataset with pre trained weights. RuntimeError: Error (s) in loading stateudict for BaseVideoModel:
Size mismatch for head.out.weight: copying a param with shape torch Size ([400, 768]) from checkpoint, the shape in current model is torch Size ([5, 768])
Size mismatch for head.out.bias: copying a param with shape torch Size ([400]) from checkpoint, the shape in current model is torch Size ([5])
The text was updated successfully, but these errors were encountered:
I have resolved it.
Add two lines of code before the code in/TAdaConv main/tadconv/utils/checkpoint. py: mismatch=ms. load_sate_dict (checkpoint ["model_state"], strict=False):
Del checkpoint ["model_state"] ["head. out. weight"]
Del checkpoint ["model_state"] ["head. out. bias"]
Hello, I encountered this error while using CHECKPOINT-FILE-PATH: "/yxli/mma/TADAConv main/TADAConv main/tadconvnextv2ttiny-in1k_k400_79.6. pyth" to load my own dataset with pre trained weights. RuntimeError: Error (s) in loading stateudict for BaseVideoModel:
Size mismatch for head.out.weight: copying a param with shape torch Size ([400, 768]) from checkpoint, the shape in current model is torch Size ([5, 768])
Size mismatch for head.out.bias: copying a param with shape torch Size ([400]) from checkpoint, the shape in current model is torch Size ([5])
The text was updated successfully, but these errors were encountered: