Global step counters
Value
The global step value for the default logdir, when get_global_step,
otherwise returns NULL invisibly.
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.
Examples
temp <- tempfile()
with_logdir(temp, {
print(get_global_step())
set_global_step(100)
print(get_global_step())
})
#> [1] 0
#> [1] 101
print(get_global_step())
#> [1] 0