Adaptive Gradient Scaling Optimizer - Coding problem | OneNoughtOne