Solved by albanD in post #2 
              
              
                Hi, 
The error states that you are modifying inplace a Tensor that you are slicing. So an op like your_tensor[ind] = xxx. 
It states that because the original value of this Tensor is needed for backward computations, this is not valid. 
You should replace this by and out of place operations. 
In par…