Oh, y_pred is the output of the last layer. So the predicted digit would correspond to an index, right?
y vector has actual digits [0, 2, 3, 5, 2, 4, 9, 8], while Y_pred is of the size (8, 10). So I should also convert y_pred to the same digit representation by taking max entry? What is the right way of handling it? Should I just convert y to one-hot encoding instead?