Thank you for pytorch. Would you have a hint how to approach ever increasing memory use?
I use pytorch to training a network(CNN),with the increase of epoch,I notice that the (RAM, but not GPU) memory increases from one epoch to the next.
After the number of epoch reaches 1000,the RAM is full and it can’t continue to iterate to train the CNN network.
@smth
Thank you so much for your reply.
But it seems did not work.
I use multi subprocesses to load data(num_workers =8) and with the increase of epoch,I notice that the (RAM, but not GPU) memory increases.
I thought may be I can kill subprocesses after a few of epochs and then reset new subprocesses to continue train the network,but I don’t know how to kill the subprocesses in the main processes.
what are you loading here? images or some other format?
Someone recently reported when loading Tiff, the python library they are using to load had memory leaks.
Also, are you using a custom Dataset class or using one from torchvision / torchtext?