Tensorboard记录非张量(numpy)信息(AUC) [英] Tensorboard logging non-tensor (numpy) information (AUC)

查看:91
本文介绍了Tensorboard记录非张量(numpy)信息(AUC)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在张量板上记录一些python-blackbox函数计算的每次运行信息.

I would like to record in tensorboard some per-run information calculated by some python-blackbox function.

具体来说,我打算在运行sess.run()之后使用sklearn.metrics.auc.

Specifically, I'm envisioning using sklearn.metrics.auc after having run sess.run().

如果"auc"实际上是张量节点,则生活将很简单.但是,设置更像是:

If "auc" was actually a tensor node, life would be simple. However, the setup is more like:

stuff=sess.run()
auc=auc(stuff)

如果有更多的tensorflow-onic方法可以做到这一点,我对此很感兴趣.我目前的设置涉及创建单独的训练图.

If there is a more tensorflow-onic way of doing this I am interested in that. My current setup involves creating separate train&test graphs.

如果有一种方法可以完成上述任务,我也对此感兴趣.

If there is a way to complete the task as stated above, I am interested in that as well.

推荐答案

您可以使用以下代码对自己的数据进行自定义摘要:

You can make a custom summary with your own data using this code:

tf.Summary(value=[tf.Summary.Value(tag="auc", simple_value=auc)]))

然后,您可以自己将该摘要添加到摘要编写器中. (不要忘记添加step).

Then you can add that summary to the summary writer yourself. (Don't forget to add a step).

这篇关于Tensorboard记录非张量(numpy)信息(AUC)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆