In the context of training some deep Q network, I have to generate clone of a tensorflow model (containing dense neural networks and some activations). This is the syntax I am using.
target_model=tf.keras.models.clone_model(model=model)
My question is, why does not it preserve the hash, calculated using hash(model)
? If these are two exact clones of each other, just at two different memory locations, should the hash change? Or is the memory location itself an input to the hash, rather than the objects themselves?