Solved by albanD in post #2 
              
              
                You can do this by first deleting the original one and then assigning your non-leaf Tensor: 
del nn.module.weight
nn.module.weight = d