You are basically still training your model to classify images into 1000 classes but your trainingsset just does not include images for 996 of those classes.
There are no errors to raise since this is “technically not wrong”. It’s just like you are using a really shitty dataset.