Blown up gradients and loss

@Deeply. Thank you for your reply. I tried both the things but the gradients are still too high is the accuracy is very bad

Is there any other solution you can provide?