Thank you!  It did solve the problem:)
It is a good lesson for me - I just learned that ‘to’ function is not in-place for tensor, but is for model layers… From now on I will just treat it as not in-place function.
Thank you again