When we want to train a custom dataset, the code should have the flexibility to accommodate variable number of classes.