标签:pre llb value for zip class write rbo color
def write_log(callback, names, logs, batch_no): for name, value in zip(names, logs): summary = tf.Summary() summary_value = summary.value.add() summary_value.simple_value = value summary_value.tag = name callback.writer.add_summary(summary, batch_no) callback.writer.flush()
在训练的时候,调用上述函数,写入tensorboard
loss = model.train_on_batch([x1,x2],y) write_log(tensorboard_cb,["trainloss","me"],loss,bathNo)
keras 在train_on_batch中启用tensorboard
标签:pre llb value for zip class write rbo color
原文地址:https://www.cnblogs.com/superxuezhazha/p/10975457.html