【发布时间】:2018-06-15 20:56:21
【问题描述】:
我有一个 tf.int32 类型的张量
我想使用tf.Print,但我需要结果是二进制的。
这甚至可能吗?
用于调试。
例子:
constant = tf.constant(5)
#magic
tf.Print(constant) # prints 101
【问题讨论】:
-
您最好的选择可能是重定向来自 C 流的输出,使用 python 对其进行修改,然后将其打印为二进制文件。 See this post for details.
标签: python tensorflow binary type-conversion integer