There seems to be a memory leak in the official Reinforcement Learning tutorial for pytorch 1.0.0.
https://pytorch.org/tutorials/intermediate/reinforcement_q_learning.html 18
I run the original python source code reinforcement_q_learning.py (cpu implementation), but increased num_episodes from 50 to 5000 to make the increasing RAM consumption visible.
(I had a custom reinforcement learning model, where I had a similar leak, and after eliminating other possible error sources I checked the ‘original’ code and there it is.)
It might be a major bug, could you check it?