@ptrblck Yes I noticed that, thanks for pointing out again.
@tom In case you’re still interested, I basically just used this solution and modified it as such that I simply create a backup copy of the data and target tensors to which I can modify and to which I can revert at any time.
Thanks for your help!