86f4e384b066cecf50dec65c8dfa48aaddfbb17d,scipy/optimize/_minimize.py,,minimize,#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,42
Before Change
// check gradient vector
if meth == "trust-constr":
if type(jac) is bool:
if jac:
fun = MemoizeJac(fun)
jac = fun.derivative
else:
jac = "2-point"
elif jac is None:
jac = "2-point"
elif not callable(jac) and jac not in ("2-point", "3-point", "cs"):
raise ValueError("Unsupported jac definition.")
else:
if jac in ("2-point", "3-point", "cs"):
if jac in ("3-point", "cs"):
warn("Only "trust-constr" method accept %s "
After Change
RuntimeWarning)
// check gradient vector
if callable(jac):
pass
elif jac is True:
// fun returns func and grad
fun = MemoizeJac(fun)
jac = fun.derivative
elif (jac in FD_METHODS and
meth in ["trust-constr", "bfgs", "cg", "l-bfgs-b", "tnc"]):
// finite differences
pass
elif meth in ["trust-constr"]:
// default jac calculation for this method
jac = "2-point"
elif jac is None or bool(jac) is False:
// this will cause e.g. LBFGS to use forward difference, absolute step
jac = None
else:
// default if jac option is not understood
jac = None
// set default tolerances
if tol is not None:
options = dict(options)
if meth == "nelder-mead":
options.setdefault("xatol", tol)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: scipy/scipy
Commit Name: 86f4e384b066cecf50dec65c8dfa48aaddfbb17d
Time: 2019-08-31
Author: andyfaff@gmail.com
File Name: scipy/optimize/_minimize.py
Class Name:
Method Name: minimize
Project Name: pfnet-research/chainer-chemistry
Commit Name: f35b10ad6e8bd19dba0cc1eb1d1338f51fefcdcf
Time: 2018-07-14
Author: mottodora@gmail.com
File Name: examples/molnet/train_molnet.py
Class Name:
Method Name: main
Project Name: Microsoft/nni
Commit Name: b7366b685afdde156e551f8ba5008857f789e368
Time: 2019-02-11
Author: 871886504@qq.com
File Name: tools/nni_annotation/code_generator.py
Class Name:
Method Name: test_variable_equal