本文介绍了如何在不保存检查点的情况下运行 estimator.train的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一种实现学习率搜索的方法,如下所述:https://arxiv.org/pdf/1506.01186.pdf .

I'm looking for a way to implement a search of learning rate as described here: https://arxiv.org/pdf/1506.01186.pdf .

我的网络是使用 estimator api 实现的,我想坚持下去,但不幸的是,我无法强制 estimator 跳过保存检查点.您知道一种无需保存检查点就可以简单地运行一个 epoch o 训练的方法吗?

My network is implemented using estimator api and I'd like to stick to that, but unfortunately I'm not able to force estimator to skip saving checkpoints. Do you know a way to simply run a one epoch o training without saving the checkpoints?

推荐答案

根据文档 tf.estimator.RunConfig:

如果 save_checkpoints_steps 和 save_checkpoints_secs 都为 None,则禁用检查点

所以代码如下:

run_config = tf.estimator.RunConfig(save_summary_steps=None,
                                    save_checkpoints_secs=None)
estimator = tf.estimator.Estimator(model_fn=model_fn, config=run_config)

这篇关于如何在不保存检查点的情况下运行 estimator.train的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-05 11:52