nicrusso7 / rex-gym

OpenAI Gym environments for an open-source quadruped robot (SpotMicro)
Apache License 2.0
973 stars 130 forks source link

Performance issue in the definition of append, rex_gym/agents/ppo/memory.py #25

Closed DLPerf closed 2 years ago

DLPerf commented 3 years ago

Hello, I found a performance issue in the definition of append, rex_gym/agents/ppo/memory.py, tf.stack and tf.gather will be calculated repeatedly during program execution, resulting in reduced efficiency. I think it should be created before the loop(with) in append.

Looking forward to your reply. Btw, I am very glad to create a PR to fix it if you are too busy.

DLPerf commented 3 years ago

@nicrusso7 Hi, my friend, could you consider my issue asap?

nicrusso7 commented 3 years ago

Hi, the PPO code was originally forked from the pyBullet repo (https://github.com/bulletphysics/bullet3/tree/master/examples/pybullet/gym/pybullet_envs/minitaur/agents/ppo). More than happy to merge a PR that improves the performance :)

nicrusso7 commented 2 years ago

Following the PR thread.