tensorflow2中 tensor转为numpy

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