Why is the value of a `tf.constant()` stored multiple times in memory in TensorFlow?

前端 未结 2 2010
日久生厌
日久生厌 2020-12-21 01:02

I read that (in TensorFlow):

the value of a tf.constant() is stored multiple times in memory.

Why is the value of a tf.con

2条回答
  •  Happy的楠姐
    2020-12-21 01:28

    They are referring to the fact that when initializing the constant one copy of the constant is stored as a numpy array and another copy is stored in tensorflow. The two copies exist while it is initializing the constant.

提交回复
热议问题