$ print(sample_tensor) Tensor("IteratorGetNext:0", shape=(20, 26, 26), dtype=float32) $ print(type(sample_tensor)) <class 'tensorflow.python.framework.ops.Tensor'>
我想将sample_tensor转换为numpy数组
sample_tensor
dwthyt8l1#
我相信简单:
sample_eager_tensor = tf.convert_to_tensor(sample_tensor) numpy_tensor = sample_eager_tensor.numpy()
应该可以
1条答案
按热度按时间dwthyt8l1#
我相信简单:
应该可以