There was another post on « freeing GPU memory »  : How to delete PyTorch objects correctly from memory 34
It does not show that the allocated memory has changed, but if I create a new tensor, it will reuse the freed memory.