How to control the frequency of loss registration messages when using tf.Estimator

I am using TF 1.4. My question is about tf.estimator.Estimator.

I would like to control the frequency of loss and step informational messages, for example:

INFO:tensorflow:loss = 0.00896569, step = 14901 (14.937 sec) 

I pass tf.estimator.RunConfig to the Estimator constructor. But I don’t think there is a loss and step option for managing messages.

I think this parameter is hardcoded in the valuator.py file, in the _train_model method:

  worker_hooks.extend([ training.NanTensorHook(estimator_spec.loss), training.LoggingTensorHook( { 'loss': estimator_spec.loss, 'step': global_step_tensor }, every_n_iter=100) ]) 
+5
source share

Source: https://habr.com/ru/post/1273668/


All Articles