The Intrinsic Dimension of Images and Its Impact on Learning