Beckschen/TransUNet

Can someone please help me with this error : Traceback (most recent call last): File "/content/drive/MyDrive/project_TransUNet/TransUNet/train.py", line 92, in <module> net.load_from(weights=np.load(config_vit.pretrained_path)) File "/content/drive/MyDrive/project_TransUNet/TransUNet/networks/vit_seg_modeling.py", line 429, in load_from unit.load_from(weights, n_block=uname) File "/content/drive/MyDrive/project_TransUNet/TransUNet/networks/vit_seg_modeling.py", line 206, in load_from self.attn.query.bias.copy_(query_bias) RuntimeError: The size of tensor a (768) must match the size of tensor b (589824) at non-singleton dimension 0

kushiluv opened this issue · 0 comments

Can someone please help me with this error : Traceback (most recent call last): File "/content/drive/MyDrive/project_TransUNet/TransUNet/train.py", line 92, in net.load_from(weights=np.load(config_vit.pretrained_path)) File "/content/drive/MyDrive/project_TransUNet/TransUNet/networks/vit_seg_modeling.py", line 429, in load_from unit.load_from(weights, n_block=uname) File "/content/drive/MyDrive/project_TransUNet/TransUNet/networks/vit_seg_modeling.py", line 206, in load_from self.attn.query.bias.copy_(query_bias) RuntimeError: The size of tensor a (768) must match the size of tensor b (589824) at non-singleton dimension 0