First method to make learning algorithm invariant