import tensorflow as tf
a = tf.constant([[1,2,3],[4,5,6]])
b = a.numpy()
print('b = ')
print(b)
tensorflow2中 tensor转为numpy
最新推荐文章于 2024-09-23 17:47:08 发布
import tensorflow as tf
a = tf.constant([[1,2,3],[4,5,6]])
b = a.numpy()
print('b = ')
print(b)