Bounded Gradient Constraint for Training Stabilization - Coding problem | OneNoughtOne