Neural Networks Regularization Through Invariant Features Learning