Solved by Nikronic in post #2 
              
              
                Hi, 
I could not find any information about buffering data from Loss (maybe necessary in particular loss). But the ideal form is to use initializations within __init__ method and usage in forward, because initializing a object has its own overhead problems when for every single run in train or test …