Yes, CPU memory.

  
    
    
    DataLoader increases RAM usage every iteration 
  
  
    Is there any reason why you load all of your images during init ? 

That was the error (and it makes lots of sense ) . 
Now, I store the image paths during __init__ and load the images during __getitem__, as you mentioned. It works perfectly. 
Thanks,
  



  
    
    
    Very consitent memory leak 
  
  
    I tried some more things: 

disabled eval mode
removed a non standard regularization step
replaced the non standard activation function with an out of the box ELU

In all cases I see the same consistent memory leak of ~108k pages of memory per epoch. 
Any additional ideas on how to analyze this would be welcome. 
Alberto
  



  
      github.com/pytorch/pytorch
  
  
    



Issue: Possible CPU-side memory leak even when fitting on GPU 2


	
	opened by trias702
	on 2018-11-12
	
	
	closed by soumith
	on 2018-11-13
	


🐛 Bug
A possible CPU-side memory leak even when fitting on the GPU using PyTorch 0.4.1.
To Reproduce
I am quite new to PyTorch,...


 	todo


  
  
    
    
  
  



  
      github.com/pytorch/pytorch
  
  
    



Issue: [Bug] CPU memory keeps increasing when using gloo backend 5


	
	opened by stgzr
	on 2019-01-18
	
	
	closed by facebook-github-bot
	on 2019-02-03
	


🐛 Bug
I found CPU memory keeps increasing when using dist.all_gather in gloo backend.
Update: it seems that gather and all_reduce have the...


 	cherry-picked
 	module: distributed


  
  
    
    
  
  


This with the @ptrblck response made me understand what are the reasons for potential memory leak in pytorch. I will suggest read thru the links I have posted.