Mismatch on multiclass model

Got a multiclass model

  • .csv file
  • columns 0 thru 7 are features
  • column 8 is category
    • 4 categories in that 9th columm
    • columns 1,3,5,7 distinquish categories
    • columns 0,2,4,6 feature attributes
  • y_train is 1 by 8 tensor
  • pred_y seems to be 5 by 4 tensor (returns a 5X4 Tensor)
  • Accuracy says dimension mismatch btween y_train and pred_y

How do I translate either one enable so I can compare results???

Note, the model output is the expected 1 by 4 array and I can take max to figure out which category is most likely. But I want to use accuracy since accuracy is NOT 1-loss

mismatch y_pred vs y_train!!!

Check what y_pred represents and transform it to class predictions if possible.
E.g. if it represents logits or log probabilities, you can use argmax to create a prediction containing class indices.