Hi, I am trying multiclass classification on music genre dataset. It has 1000 examples, where each vector has 28 features. And trying to predict amongst 10 different classes. For each example, I created label vector of 10 elements and set the desired element in the vector to 1. I am using MultiLabelSoftMarginLoss(). I referred Multi-Label classification: loss is low but accuracy is low 1.
I was trying to calculate F1 score, but I found out that after training, for each training example, same output neuron has maximum activation amongst others, which makes this model to classify every training example as same class. But, the loss when printed, reaches to 0.30.
This is the link to the code: https://github.com/linonymous/MusicGenreClassifier/blob/master/Classifier%20Models/Neural%20Network/three_layer_nn_pytorch.py 5
Please correct me if I am wrong or mistaken. Thanks in advance.