I found other similar question like this. Here is one of example.

  
      github.com/pytorch/pytorch
  
  
    



Issue: CPU memory gradually leaks when num_workers > 0 in the DataLoader 133


	
	opened by bfreskura
	on 2018-10-29
	
	
	


🐛 Bug
CPU memory will leak if the DataLoader num_workers > 0.
To Reproduce
Run the following snippet:
class DataIter(Dataset):
 def __init__(self):
 path = "path/to/data"
...


 	medium priority


  
  
    
    
  
  


In this thread, they said it is fixed recent day at:

  
      github.com/pytorch/pytorch
  
  
    



Issue: Potential memory leak in Tensor.size() 80


	
	opened by shhshn
	on 2018-10-29
	
	
	closed by facebook-github-bot
	on 2018-10-30
	


🐛 Bug
Tensor.size() leaks 28 bytes of memory (similar to the previously resolved issue of #1963)
To Reproduce
import torch, tracemalloc; tracemalloc.start()
def main():
 def...


 	high priority


  
  
    
    
  
  


I am fixing my local torch’s code. Hopefully I help