Hi! I am trying to use multiple environments in my program, like the following code:
args = [setting1, setting2, setting3]
for i in range(3):
env = make_env(args[i])
# environmental interactions and training process
When I switch to the next environmental setting, I use ti.reset() to successfully release GPU memory (this works, thx), but I found that the cpu memory of the program still increase (this might because the program needs to execute env.initialize() again). Is there any way to free up cpu memory occupied by the previous environment? Otherwise, the computer's memory will overflow.
Thx!
Hi! I am trying to use multiple environments in my program, like the following code:
When I switch to the next environmental setting, I use ti.reset() to successfully release GPU memory (this works, thx), but I found that the cpu memory of the program still increase (this might because the program needs to execute env.initialize() again). Is there any way to free up cpu memory occupied by the previous environment? Otherwise, the computer's memory will overflow.
Thx!