tensorflow2输出张量的值
使用.numpy()方法在torch里很管用,但是在tf2里报AttributeError: 'Tensor' object has no attribute 'numpy'查资料似乎tf.enable_eager_execution()能够解决问题,但是只有tf1才有enable_eager_execution()方法module 'tensorflow' has no attribute 'enable_eager_execution'使用tf.print会报'Tensor' objec