|View source on GitHub|
Periodically performs the tensorflow op in
tf_agents.utils.common.periodically( body, period, name='periodically' )
The body tensorflow op will be executed every
period times the periodically
op is executed. More specifically, with
n the number of times the op has
been executed, the body will be executed when
n is a non zero positive
period (i.e. there exist an integer
k > 0 such that
k * period == n).
None, it will not perform any op and will return a
period is 1, it will just execute the body, and not create any counters
body: callable that returns the tensorflow op to be performed every time an internal counter is divisible by the period. The op must have no output (for example, a tf.group()).
period: inverse frequency with which to perform the op.
name: name of the variable_scope.
TypeError: if body is not a callable.
An op that periodically performs the specified op.