I’m not 100%, but I suspect the problem is that x_seq
is a Variable, so calling clone
still points to the same x_seq.data
- which you’re attempting to set in place with the slicing. Therefore, accessing storage shared between x_seq
and its clone. See here.