def _AddRateToSummary(tag, rate, step, sw):
 sw.add_summary(summary_pb2.Summary(value=[summary_pb2.Summary.Value(tag=tag, simple_value=rate)]), step)

def _AddRateToSummary ( tag , rate , step , sw ) : sw . add_summary ( summary_pb2 . Summary ( value = [ summary_pb2 . Summary . Value ( tag = tag , simple_value = rate ) ] ) , step )
adds the given rate to the summary with the given tag .