Solved by ptrblck in post #2 
              
              
                You could map the current class indices from [0, 24] to the expected range [0, 18] for 19 classes, since your use case would otherwise work with 25 classes where some might never be used.