vectorise project_gradient_norm