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
I'm trying to adapt the self-supervision tutorial for a 2D case. However, I keep getting a tensor shape mismatch error at the contrastive loss step. I've posted a screenshot of the error here: https://imgur.com/a/AXmWKgB
Looking at the source code, I see that the error could be caused by the shape mismatch between negatives_mask and sim_matrix but I'm not sure how to proceed. The things I have changed to adapt for 2D are:
At the flatten step during training, change end_dim=4 to end_dim=3
Change img_size and patch_size to a 2-tuple instead of 3-tuple
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm trying to adapt the self-supervision tutorial for a 2D case. However, I keep getting a tensor shape mismatch error at the contrastive loss step. I've posted a screenshot of the error here: https://imgur.com/a/AXmWKgB
Looking at the source code, I see that the error could be caused by the shape mismatch between
negatives_mask
andsim_matrix
but I'm not sure how to proceed. The things I have changed to adapt for 2D are:end_dim=4
toend_dim=3
img_size
andpatch_size
to a 2-tuple instead of 3-tupleAny suggestion on how to proceed is appreciated!!
Beta Was this translation helpful? Give feedback.
All reactions