Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example_algorithm.py #17

Open
xswcyj opened this issue Oct 5, 2018 · 0 comments
Open

example_algorithm.py #17

xswcyj opened this issue Oct 5, 2018 · 0 comments

Comments

@xswcyj
Copy link

xswcyj commented Oct 5, 2018

this line can't go through:
mod.invert_external(minimize, method='Nelder-Mead')

the error information is as followed:

AttributeError Traceback (most recent call last)
in
----> 1 mod.invert_external(minimize, method='Nelder-Mead')

~/miniconda3/lib/python3.5/site-packages/hazel-2018.6.7-py3.5-macosx-10.9-x86_64.egg/hazel/model.py in invert_external(self, algorithm, use_jacobian, **kwargs)
1651 tmp = algorithm(self._func_nograd, self.nodes, callback=self._callback_general, **kwargs)
1652
-> 1653 self._func_grad(tmp['x'])
1654 self._callback_general(tmp['x'])
1655

~/miniconda3/lib/python3.5/site-packages/hazel-2018.6.7-py3.5-macosx-10.9-x86_64.egg/hazel/model.py in _func_grad(self, x)
1595 self.nodes = x
1596 self.set_new_model(self.nodes)
-> 1597 self.synthesize_and_compute_rf(compute_rf=True)
1598 self.chi2, dchi2, _ = self.compute_chi2()
1599 return self.chi2, dchi2

~/miniconda3/lib/python3.5/site-packages/hazel-2018.6.7-py3.5-macosx-10.9-x86_64.egg/hazel/model.py in synthesize_and_compute_rf(self, compute_rf, include_jacobian)
1081 loop = 0
1082
-> 1083 self.hessian_regularization = np.zeros(self.n_free_parameters_cycle)
1084 self.grad_regularization = np.zeros(self.n_free_parameters_cycle)
1085

AttributeError: 'Model' object has no attribute 'n_free_parameters_cycle'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant