cbfinn / gps

Guided Policy Search
http://rll.berkeley.edu/gps/
Other
597 stars 239 forks source link

Bug #24

Closed Tveek closed 8 years ago

Tveek commented 8 years ago

Running this code python python/gps/gps_main.py box2d_badmm_example;In the Calculating step,there has error below: /home/prafly/desktop/gps/python/gps/algorithm/policy_opt/policy_opt_caffe.py:140: RuntimeWarning: divide by zero encountered in divide self.policy.scale = np.diag(1.0 / np.std(obs, axis=0)) I0511 10:33:26.268626 17880 solver.cpp:341] Iteration 0, Testing net (#0) I0511 10:33:26.268664 17880 net.cpp:748] Ignoring source layer Python4 I0511 10:33:26.268708 17880 solver.cpp:409] Test net output #0: InnerProduct3 = 0.000162208 I0511 10:33:26.268729 17880 solver.cpp:409] Test net output #1: InnerProduct3 = -0.00041328 I0511 10:33:26.268740 17880 solver.cpp:341] Iteration 0, Testing net (#1) I0511 10:33:26.268748 17880 net.cpp:748] Ignoring source layer Python1 I0511 10:33:26.268760 17880 net.cpp:748] Ignoring source layer Python4 I0511 10:33:26.268780 17880 solver.cpp:409] Test net output #0: InnerProduct3 = 0 I0511 10:33:26.268792 17880 solver.cpp:409] Test net output #1: InnerProduct3 = 0 I0511 10:33:29.947541 17880 net.cpp:748] Ignoring source layer Python4 I0511 10:33:29.948006 17880 net.cpp:748] Ignoring source layer Python4 I0511 10:33:30.041903 17880 net.cpp:748] Ignoring source layer Python4 /home/prafly/desktop/gps/python/gps/utility/gmm.py:202: RuntimeWarning: invalid value encountered in less w[:, (self.mass < (1.0 / K) * 1e-4)[:, 0]] = 1.0 / N Exception in thread Thread-2: Traceback (most recent call last): File "/usr/lib/python2.7/threading.py", line 810, in bootstrap_inner self.run() File "/usr/lib/python2.7/threading.py", line 763, in run self.__target(_self.args, *_self.__kwargs) File "python/gps/gps_main.py", line 369, in target=lambda: gps.run(itr_load=resume_training_itr) File "python/gps/gps_main.py", line 67, in run self._take_iteration(itr, traj_sample_lists) File "python/gps/gps_main.py", line 195, in _take_iteration self.algorithm.iteration(sample_lists) File "/home/prafly/desktop/gps/python/gps/algorithm/algorithm_badmm.py", line 59, in iteration self._update_policy_fit(m) # Update policy priors. File "/home/prafly/desktop/gps/python/gps/algorithm/algorithm_badmm.py", line 180, in _update_policy_fit SampleList(self.cur[m].pol_info.policy_samples) File "/home/prafly/desktop/gps/python/gps/algorithm/policy/policy_prior_gmm.py", line 83, in update self.gmm.update(XU, K) File "/home/prafly/desktop/gps/python/gps/utility/gmm.py", line 174, in update logobs = self.estep(data) File "/home/prafly/desktop/gps/python/gps/utility/gmm.py", line 75, in estep check_finite=False) File "/usr/lib/python2.7/dist-packages/scipy/linalg/decomp_cholesky.py", line 81, in cholesky check_finite=check_finite) File "/usr/lib/python2.7/dist-packages/scipy/linalg/decomp_cholesky.py", line 30, in _cholesky raise LinAlgError("%d-th leading minor not positive definite" % info) LinAlgError: 1-th leading minor not positive definite

cbfinn commented 8 years ago

Can you provide more details? -- Is the error deterministic? What iteration did it occur at?

Tveek commented 8 years ago

@cbfinn It is deterministic.It occurs at first iteration.

cbfinn commented 8 years ago

Ok. Unfortunately, I don't have time to look into this right now because of several upcoming deadlines. The example has worked for me in the past, so it seems likely that this error is due to a recent pull request.

I'll be able to look into it after May 25 (unless the issue hasn't been resolved by you or someone else by then).

@cbfinn https://github.com/cbfinn It is deterministic.It occurs at first iteration.

— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/cbfinn/gps/issues/24#issuecomment-218366804

ytian81 commented 8 years ago

I have come across this error as well, is there any solution?

cbfinn commented 8 years ago

Fixed in this PR: https://github.com/cbfinn/gps/pull/30