It seems you might use a pretrained model, since your output has a shape of [batch_size, 1000] (the 1000 classes would then correspond to the ImageNet classes).
Based on your description, you are dealing with 8 classes, so I would recommend to change the last linear layer so that only 8 logits will be used.
Have a look at the transfer learning tutorial 2 for more information.