def addRegularizationArgs(parser):
    """
    Add arguments defining regularization
    Parameters:
    - parser  -- argument parser as an object of ArgumentParser
                 to add arguments
    Returns: constructed argument parser
    """
    parser.add_argument("--l1", default=0, type=float,
                        help="l1 regularization")
    parser.add_argument("--l2", default=0, type=float,
                        help="l2 regularization")
    return parser