anubhavm11:

Is there any possible explanation for this behaviour, or is this solely due to a bug in my code?


It’s most likely not a bug, but just a “lucky” and “bad” seed. Don’t try to optimize your code for a specific seed, as your training will be overall unstable and might break easily.
Based on your description it seems the learning rate is too high, but apparently some seeds force the initialization methods to generate working parameters for the setup.