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
hi, yizhi ! Thank you for sharing the code.
During running test_few_shot, I found (selected_cls.shape) shows torch.Size([52, 4]), which is against your note: # selected_cls: [bs, nshot] (batch_size should be 64 while 52 seems to be char_num)
and brings the error:
selected_cls_ = selected_cls_.expand(images_of_onefont.size(0), nums, opts.img_size, opts.img_size)
RuntimeError: The expanded size of the tensor (64) must match the existing size (52) at non-singleton dimension 0. Target sizes: [64, 4, 64, 64]. Tensor sizes: [52, 4, 1, 1].
I can't orientation the problem, should I just reshape all the tensor? Help me please.
The text was updated successfully, but these errors were encountered:
hi, yizhi ! Thank you for sharing the code.
During running test_few_shot, I found (selected_cls.shape) shows torch.Size([52, 4]), which is against your note: # selected_cls: [bs, nshot] (batch_size should be 64 while 52 seems to be char_num)
and brings the error:
selected_cls_ = selected_cls_.expand(images_of_onefont.size(0), nums, opts.img_size, opts.img_size)
RuntimeError: The expanded size of the tensor (64) must match the existing size (52) at non-singleton dimension 0. Target sizes: [64, 4, 64, 64]. Tensor sizes: [52, 4, 1, 1].
I can't orientation the problem, should I just reshape all the tensor? Help me please.
The text was updated successfully, but these errors were encountered: