Estimator 训练期间的验证

编程入门 行业动态 更新时间:2024-10-24 10:23:21
本文介绍了Estimator 训练期间的验证的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

限时送ChatGPT账号..

不推荐使用 TensorFlow r1.3 监视器:

With the TensorFlow r1.3 monitors are deprecated:

"2016-12-05",不推荐使用监视器.请使用 tf.train.SessionRunHook.")而 Estimator.train(input_fn,hooks,..) 仅适用于钩子.

"2016-12-05", "Monitors are deprecated. Please use tf.train.SessionRunHook.") and Estimator.train(input_fn,hooks,..) works only with hooks.

如何使用钩子实现验证监视器的功能?

How to implement the functionality of validation monitor with hooks?

推荐答案

我一直在使用 SummarySaverHook 而不是 Monitors.它们还没有那么强大",而且培训材料还没有更新,其中没有关于如何准确复制 Monitor 功能的描述.

I have been using SummarySaverHook instead of Monitors. They are not "as powerful" just yet, and the training material has not been updated with a description on how exactly replicate the Monitor functionality.

这是我如何使用它:

summary_hook = tf.train.SummarySaverHook(
    save_steps=SAVE_EVERY_N_STEPS,
    output_dir='./tmp/rnnStats',
    scaffold=tf.train.Scaffold(),
    summary_op=tf.summary.merge_all())

print("Classifier.train")
classifier.train(input_fn=train_input_fn, steps=1000, hooks=[summary_hook])

这篇关于Estimator 训练期间的验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

更多推荐

[db:关键词]

本文发布于:2023-05-01 05:09:33,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1405177.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Estimator

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!