def create_summary(name, v):
    assert isinstance(name, six.string_types), type(name)
    v = float(v)
    s = tf.Summary()
    s.value.add(tag=name, simple_value=v)
    return s
Return a tf.Summary object with name and simple scalar value v
dataset/ETHPy150Open ppwwyyxx/tensorpack/tensorpack/tfutils/summary.py/create_summary