how to create outputs for key points of bounding boxes on image in Neural network in Python
Your network can be improved in many ways :
Adding a few convolutional layers could help reduce the dimension as you have a lot a weights on your first FC layer, and this will improve the speed of your training.
But your main problem is your loss function, cross entropy is used for classification, which means your network is considering all your 5 ouputs as classes (a softmax function is applied to all 5 of them before computing cross entropy).
For your task, i would feed the outputs of the convolutional network into 2 networks:

One is the classifier that tells you if it is a cat or a dog (1 output).
The second outputs the bounding box (4 outputs).

These networks can be trained independently using different losses and will give you coherent results.