Ah, ok, I think I see.  It is because .detach() doesnt implicitly create a copy of the tensor, so when I later modify that tensor, it’s updating the tensor on the upstream side of .detach() too.  By cloning first, this issue doesnt arise, and all is ok?