Google colaboratory 如何在Colab中获得内核的控制台输出

Google colaboratory 如何在Colab中获得内核的控制台输出,google-colaboratory,Google Colaboratory,我正在尝试在Colab中使用tf.Print 下面是示例代码: tf.enable_eager_execution() tensor = tf.range(10) tf.print("tensors:", tensor, {2: tensor * 2}, output_stream=sys.stdout) 然而,我看不到输出,可能是因为输出到笔记本内核的控制台输出,而不是笔记本单元输出 那么我如何看待colab内核控制台输出??任何帮助都将不胜感激 从运行时菜单中选择“查看运行时日志” 重

我正在尝试在Colab中使用tf.Print

下面是示例代码:

tf.enable_eager_execution()

tensor = tf.range(10)

tf.print("tensors:", tensor, {2: tensor * 2}, output_stream=sys.stdout)
然而,我看不到输出,可能是因为输出到笔记本内核的控制台输出,而不是笔记本单元输出


那么我如何看待colab内核控制台输出??任何帮助都将不胜感激

从运行时菜单中选择“查看运行时日志”

重复你的例子: