1
在tf.Print function中有input
和data
参数。他们的意思是什么?我从文献中不理解这一点。什么是tf.Print功能中的输入和数据参数?
假设我想打印张量A
。我应该通过它作为input
,data
,这两种或其他方式?
在tf.Print function中有input
和data
参数。他们的意思是什么?我从文献中不理解这一点。什么是tf.Print功能中的输入和数据参数?
假设我想打印张量A
。我应该通过它作为input
,data
,这两种或其他方式?
的tf.Print
行为像tf.identity
,因此它的作用就像input=tf.identity(input)
,即参数input
, 和data: A list of tensors to print out when op is evaluated
,这意味着当我们运行input
,所述data
将被评估,其结果将被打印的含义。
如果要运行运算A
和打印运B,C
,你应该使用A=tf.Print(A, [B,C])
然后运行sess.run(A)
想我wan't只打印'A',没有任何'B'或'C'。 – Dims
您只需使用'A'而不是'B,C',这意味着'A = tf.Print(A,[A])' – gaussclb
好的,所以左边部分'A ='是必不可少的,谢谢。 – Dims