For example, suppose I'm building a transformer model (from huggingface) and there are 20 classes in the training data however there are only 5 classes in the testing data. To configure the transformer model from huggingface, for example, BertConfig, we need to provide a parameter: num_labels. Should I set num_labels to 20 or 5 because there are only 5 classes in the testing data?
CodePudding user response:
20.because your trained network has 20 classes.