WIP: Fixing the scaling of the gradients