Thank you for your reply! @ptrblck  I am sorry I didn’t say it clearly… It means that after adding the weighted loss function, the accuracy is about 30%. In addition, test sets and training sets are data from the same data source.
Originally, the number of each category of the data set 0-9 category is 1000. I manually disrupted the imbalance of the number of categories, which were divided into training set, verification set, and test set. In order to test the validity of the weighted loss function.
My training data, verification data and test data are all attached to this link (data.zip).