Solved by albanD in post #2 
              
              
                Hi, 
Yes this is the correct workaround. You just want to make sure that you don’t modify the c you get as input inplace. So you clone it before changing it inplace. 
Note that we usually do c_aug = c.clone() instead of using torch.clone.