@ptrlbck, the loss does get stuck at 2.3025 and oscillates between 2.29 and 2.31
I tried changing the parameters like learning rate other hyper parameters. The strange part here is that the code works well on MNIST but not on CIFAR-10/SVHN datasets