You would need to look deeper in the serialization mechanism for tensors but it is possible that it uses their address in memory as an “id” to make sure to save each tensor only once. In that case, every time you load the model, it gets to a new place in memory and so "id"s will change.