Solved by Nikronic in post #2 
              
              
                Hi, 
Your question is not directly affecting PyTorch, so you can save the eta variable in a list with same length of number of epochs and at the end of the loops, write it into a file using python open(file_path, 'w+') method. 
There are other ways to do it though. 
But something you should consider…