gps icon indicating copy to clipboard operation
gps copied to clipboard

Support tensorflow 1.2

Open PhilJd opened this issue 8 years ago • 6 comments

Hi, thanks for the great work! I tweaked a few lines in the code in order to run gps using the newest version of tensorflow. Would you be interested in a pull request? It's mainly about changing deprecated functions.

Cheers, Phil

PhilJd avatar May 26 '17 11:05 PhilJd

Yes, we would appreciate a pull request!

cbfinn avatar Jun 01 '17 03:06 cbfinn

@PhilJd Hi Phil, did you submit the PR by any chance, I am using tf1.1, and would appreciate your code.

Thanks, Jianlan

jianlanluo avatar Jun 09 '17 17:06 jianlanluo

Hi @JianlanLuo , I just committed my current status to my fork at phil/tensorflow_1.2. This code runs, but the net does not converge, also mentioned here. I wanted to fix that before submitting the pull request, but I was not able to spot the bug yet. Maybe I missed one of the cases where the function parameters are not explicitely specified, e.g. tf.concat changed from tf.concat(axis, value) to tf.concat(value, axis).

I'll try to have a look again either on Sunday or early next week. Cheers, Phil

PhilJd avatar Jun 09 '17 19:06 PhilJd

I tried the badmm_example with tf and can confirm the following error at the 12th (last) iteration:

DEBUG:LinAlgError: 1-th leading minor not positive definite
DEBUG:Increasing eta: 9872104440081784.000000 -> 10333273041924524.000000
Traceback (most recent call last):
  File "python/gps/gps_main.py", line 79, in run
    self._take_iteration(itr, traj_sample_lists)
  File "python/gps/gps_main.py", line 217, in _take_iteration
    self.algorithm.iteration(sample_lists)
  File "python/gps/algorithm/algorithm_badmm.py", line 68, in iteration
    self._update_trajectories()
  File "python/gps/algorithm/algorithm.py", line 127, in _update_trajectories
    self.traj_opt.update(cond, self)
  File "python/gps/algorithm/traj_opt/traj_opt_lqr_python.py", line 78, in update
    eta, algorithm, m)
  File "python/gps/algorithm/traj_opt/traj_opt_lqr_python.py", line 453, in backward
    reasonably well conditioned)!')
ValueError: Failed to find PD solution even for very                             large eta (check that dynamics and cost are                             reasonably well conditioned)!

Is this similar to the error you had?

robotsorcerer avatar Jun 10 '17 01:06 robotsorcerer

No, for me there was no ValueError, the net ran fine but didn't converge. Thanks for the Traceback, there's a good chance that this is related to my issue. Did this error occur on my branch or on the original master? And which tf version are you using?

PhilJd avatar Jun 10 '17 06:06 PhilJd

A variant of the original master: lakehanne/gps . TF 1.1

robotsorcerer avatar Jun 10 '17 12:06 robotsorcerer