According to this answer,
the value of a
tf.constant()
is stored multiple times in memory.
This provides a practical answer to whether to use a tensorflow constant or non-trainable variable when you have some big tensor that should not change value.
However, it is not clear to me why both exist, and why (and under which circumstances) tf.constant
would be replicated in memory.