tensorflow2中 tensor转为numpy

import tensorflow as tf
a = tf.constant([[1,2,3],[4,5,6]])
b = a.numpy()
print('b = ')
print(b)

你可能感兴趣的:(深度学习函数学习)