when I try running loss = criterion(y_pred, label) in validate function，the error doesn’t occur.
but I do not understand why the y_pred’s tpye is not same in train function and validate fuction. Besides,why does the y_pred’s in train fuction have two tensor data？ What is the difference between y_pred[0] and y_pred[1]？
These problems make me very confused
If you can answer me, I will thank you very much.