How regularization affects the geometry of loss functions