2017-11-23 26 views
-3
--------------------------------------------------------------------------- 
TypeError         Traceback (most recent call last) 
<ipython-input-14-af22e6723577> in <module>() 
    19   with tf.name_scope("summaries"): 
    20    avg=tf.div(update_total,tf.cast(increment_step,tf.float32),name="average") 
---> 21    tf.summary.scalar(b'Output',output,name="output_summary") 
    22    tf.summary.scalar(b'Sum of outputs over time',update_total,name="total_summary") 
    23    tf.summary.scalar(b'Average of outputs over time',avg,name="average_summary") 

TypeError: scalar() got multiple values for argument 'name' 

답변

0

해당 문서를 참조하십시오 가지고 : https://www.tensorflow.org/api_docs/python/tf/summary/scalar

scalar( name, tensor, collections=None, family=None)

첫 번째 인수는 name 인수입니다, 따라서 호출
tf.summary.scalar(b'Output', output, name="output_summary")가 모두 b'Output''output_summary' 할당을 name.

scalar에 대한 다음 2 번의 전화와 정확한 문제가 있습니다.

+0

내가 갖고있어. 문제가 해결되어 고맙습니다. – Pengbo