dqn_keras.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:Attention-DQN 作者: chasewind007 项目源码 文件源码
def save_scalar(step, name, value, writer):
    """Save a scalar value to tensorboard.
      Parameters
      ----------
      step: int
        Training step (sets the position on x-axis of tensorboard graph.
      name: str
        Name of variable. Will be the name of the graph in tensorboard.
      value: float
        The value of the variable at this step.
      writer: tf.FileWriter
        The tensorboard FileWriter instance.
      """
    summary = tf.Summary()
    summary_value = summary.value.add()
    summary_value.simple_value = float(value)
    summary_value.tag = name
    writer.add_summary(summary, step)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号