Traceback (most recent call last):
File "train.py", line 124, in
main(opt)
File "train.py", line 87, in main
train_loss, train_acc = train_one_epoch(model=model,
File "F:\ImageClassification\EmotionClassification\utils.py", line 142, in train_one_epoch
accu_num += torch.eq(pred_classes, labels.to(device)).sum()
RuntimeError: The size of tensor a (256) must match the size of tensor b (2) at non-singleton dimension 2
Thanks for your wnoderful works, and here I have some problems about the dimension of batch_size, like up,
is the batch_size not a tensor vector?
Traceback (most recent call last): File "train.py", line 124, in
main(opt)
File "train.py", line 87, in main
train_loss, train_acc = train_one_epoch(model=model,
File "F:\ImageClassification\EmotionClassification\utils.py", line 142, in train_one_epoch
accu_num += torch.eq(pred_classes, labels.to(device)).sum()
RuntimeError: The size of tensor a (256) must match the size of tensor b (2) at non-singleton dimension 2
Thanks for your wnoderful works, and here I have some problems about the dimension of batch_size, like up, is the batch_size not a tensor vector?