I have a weird issue when appending tensors to a list.
I have a code similar to this:
tensor_list = []
for i in range(24):
   current_tensor = function (...)
   tensor_list.append(current_tensor)
   #print (tensor_list)

print (tensor_list)

when I uncomment the print inside the loop, the values in the last print are correct. But when I comment it, I get wrong values in the final print. Any idea what could cause this?