I would say, note down the sizes during the for loop and after the for loop, create a clean model by setting the seed.
or you can reset the parameters at the end:

  
    
    
    How to re-set alll parameters in a network 
  
  
    How to re-set the weights for the entire network, using the original pytorch weight initialization