Solved by albanD in post #2 
              
              
                You should not use .data anymore but use the with torch.no_grad(): context manager with the most recent versions of pytorch. 
See how the nn.init module work for example here. 
And yes to all your questions otherwise, it will work exactly that way. 
Note that setting requires_grad = False will make …