Q:

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

---------------------------------------------------------------------------
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'

A:

See the docs: https://www.tensorflow.org/api_docs/python/tf/summary/scalar

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

The first argument is the name argument, hence the call tf.summary.scalar(b'Output', output, name="output_summary") assigns both b'Output' and 'output_summary' to name.
You have the exact issue with the next 2 calls to scalar.

