I’ve checked with TensorFlow and there is a workaround -

  
      stackoverflow.com
  
  
      
    
  

  Clearing Tensorflow GPU memory after model execution 11



  python, tensorflow, gpu



  
  answered by
  
    liviaerxin
  
  on 04:12PM - 07 Aug 18 UTC


  
  
    
    
  
  


But it is an annoying one… not sure how it would work with pytorch