Thanks a lot for your answer! The function storage().data_ptr() helps a lot for me. But I am still confused about the function id(). If it does not returns the memory address, does it return a number for referencing the corresponding object? Then why is it unstable for elements of a tensor a? Is the tensor a constantly changing its reference to its elements?
Thanks!!