Mic*_*ein 8 tensorflow tensorflow-estimator
我正在使用TF 1.4.我的问题是关于tf.estimator.Estimator.
我想控制"丢失和步骤"信息消息的频率,例如:
INFO:tensorflow:loss = 0.00896569, step = 14901 (14.937 sec)
Run Code Online (Sandbox Code Playgroud)
我将tf.estimator.RunConfig传递给Estimator的构造函数.但我认为没有一个参数来控制"丢失和步骤"消息.
我认为参数在_train_model方法的estimator.py中是硬编码的:
worker_hooks.extend([
training.NanTensorHook(estimator_spec.loss),
training.LoggingTensorHook(
{
'loss': estimator_spec.loss,
'step': global_step_tensor
},
every_n_iter=100)
])
Run Code Online (Sandbox Code Playgroud)
尝试将logging_hook作为返回的estimator_spec中的training_hook参数返回,模式=='train' 使用Tensorflow Estimator打印额外的训练指标
https://github.com/tensorflow/tensorflow/pull/619/commits/48603b7faed85753ab905f177cbf4e0c8d1dcb64
https://www.tensorflow.org/install/install_sources#clone_the_tensorflow_repository
源代码:https ://stackoverflow.com/a/38097276/2218905
| 归档时间: |
|
| 查看次数: |
2002 次 |
| 最近记录: |