Applying weight regularization