使用命令回傳張量值
a, b, c, d, e = tf.unstack(x, axis=1)
然后當我嘗試顯示a我得到的所有值時:
<tf.Tensor 'unstack_4:0' shape=(5,) dtype=int32>
我怎樣才能看到這個張量的值?
我對 TensorFlow 很陌生。
uj5u.com熱心網友回復:
從結果中解壓出來的變數tf.unstack仍然只是張量。因此,您可以使用tf.print(a)(tf.Print()如果您仍在使用 TensorFlow v1)來列印這些張量值。
檔案:https : //www.tensorflow.org/api_docs/python/tf/print
轉載請註明出處,本文鏈接:https://www.uj5u.com/qiye/369681.html
標籤:张量流
