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: The expanded size of the tensor (512) must match the existing size (512000) at non-singleton dimension 1. Target sizes: [5, 512]. Tensor sizes: [1, 512000]
when computing the accuracy on the training set. I assume this is because the training set has some different structure than validation set.
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 try to compute the loss and accuracy on the training set after each epoch. This is for
vit_tiny_patch16_224
.Note: the
train_metrics
compute the loss over the course of one epoch, so its not the same as loss at end of epoch I guess.I tried to simply add
But this gives me an error:
RuntimeError: The expanded size of the tensor (512) must match the existing size (512000) at non-singleton dimension 1. Target sizes: [5, 512]. Tensor sizes: [1, 512000]
when computing the accuracy on the training set. I assume this is because the training set has some different structure than validation set.
Does someone have a suggestion how to do this?
Beta Was this translation helpful? Give feedback.
All reactions