Improbable-AI / walk-these-ways

Sim-to-real RL training and deployment tools for the Unitree Go1 robot.
https://gmargo11.github.io/walk-these-ways/
Other
492 stars 129 forks source link

memory leak #10

Closed yihangyao closed 1 year ago

yihangyao commented 1 year ago

Hi, I ran your script play.py in the fold "scripts". I found that there is a slow but fatal GPU memory leak problem. Could you provide any suggestions about it? Thanks!

gmargo11 commented 1 year ago

Hi @LiousYao , noticed you closed this and wanted to check in, did you find a fix? I gave a quick try to replicate this issue but didn't see it on my machine. An older version of the code (before initial release) had this issue but I thought adding the line with torch.no_grad(): had fixed it

-Gabe

yihangyao commented 1 year ago

Thanks for your reply! Yes, by using with torch.no_grad(): in the step() and reset() functions, we can fix this issue.