Prints Given Tensors Every N Local Steps, Every N Seconds, or at End

The tensors will be printed to the log, with INFO severity.

hook_logging_tensor(tensors, every_n_iter = NULL, every_n_secs = NULL,
  formatter = NULL, at_end = FALSE)

Arguments

tensors

A list that maps string-valued tags to tensors/tensor names.

every_n_iter

An integer value, indicating the values of tensors will be printed once every N local steps taken on the current worker.

every_n_secs

An integer or float value, indicating the values of tensors will be printed once every N seconds. Exactly one of every_n_iter and every_n_secs should be provided.

formatter

A function that takes list(tag = tensor) and returns a string. If NULL uses default printing all tensors.

at_end

A boolean value specifying whether to print the values of tensors at the end of the run.

Details

Note that if at_end is TRUE, tensors should not include any tensor whose evaluation produces a side effect such as consuming additional inputs.

See also

Other session_run_hook wrappers: hook_checkpoint_saver, hook_global_step_waiter, hook_history_saver, hook_nan_tensor, hook_progress_bar, hook_step_counter, hook_stop_at_step, hook_summary_saver, session_run_hook