get_global_step: Global step counters

View source: R/log.R

get_global_stepR Documentation

Global step counters

Description

Global step counters

Usage

get_global_step(increment = TRUE)

set_global_step(step)

Arguments

increment

Wether to increment the step when getting it.

step

New value for step.

Details

tfevents tracks and automatically increased the step counter whenever log_event() is called. Note that, it maintains a separate step counter for each root logdir, thus if you change the logdir using set_default_logdir() or with_logdir(), a different step counter will be used.

Value

The global step value for the default logdir, when get_global_step, otherwise returns NULL invisibly.

Functions

  • set_global_step(): Set the global step.

Examples

temp <- tempfile()
with_logdir(temp, {
  print(get_global_step())
  set_global_step(100)
  print(get_global_step())
})
print(get_global_step())

tfevents documentation built on June 27, 2024, 5:10 p.m.