legal_params = []
for fn in legal_params_fns:
legal_params += inspect.getargspec(fn)[0]
legal_params = set(legal_params)
for params_name in params:
if params_name not in legal_params:
if params_name != "nb_epoch":
After Change
for params_name in params:
for fn in legal_params_fns:
if has_arg(fn, params_name):
break
else:
if params_name != "nb_epoch":
raise ValueError(
"{} is not a legal parameter".format(params_name))