Predicted category is changing on mulitple runs on the same string


I am using the pre trained model of checkpoint bert-base-model to classify the CATEGORIES on 7 labels,

I have trained the model on the following data and fine-tuned it

CATEGORY A- 109 samples
CATEGORY B - 109 samples
CATEGORY C - 109 samples
CATEGORY D - 109 samples
CATEGORY E - 109 samples
CATEGORY F - 109 samples
CATEGORY G - 109 samples

The language that I have trained on is Roman Urdu.

However, whenever I predict the result the CATEGORIES toggled between each other

The problem is When I input a text in the classifier it changes the predicted category upon multiple runs.

The distribution is

60% - Train
20% - Test
20% - Validate

I am also using another NER model that removes the name entities in the sentences before category classification. Could this be causing the randomness issue? or there is some other problem

Anticipating a positive response in resolving this error


1 Like