2017-11-23 6 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' 

Antwort

0

die Dokumentation Siehe: https://www.tensorflow.org/api_docs/python/tf/summary/scalar

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

Das erste Argument ist die name Argument, daher der Aufruf
tf.summary.scalar(b'Output', output, name="output_summary") sowohl ordnet b'Output' und 'output_summary' zu name.

Sie haben das genaue Problem mit den nächsten 2 Anrufe zu scalar.

+0

Ich habe dich. Das Problem war gelöst und vielen Dank. – Pengbo

Verwandte Themen