tf_agents.utils.common.periodically
Stay organized with collections
Save and categorize content based on your preferences.
Periodically performs the tensorflow op in body
.
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
multiple of period
(i.e. there exist an integer k > 0
such that
k * period == n
).
If period
is None
, it will not perform any op and will return a
tf.no_op()
.
If period
is 1, it will just execute the body, and not create any counters
or conditionals.
Args |
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.
|
Raises |
TypeError
|
if body is not a callable.
|
Returns |
An op that periodically performs the specified op.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-04-26 UTC.
[{
"type": "thumb-down",
"id": "missingTheInformationINeed",
"label":"Missing the information I need"
},{
"type": "thumb-down",
"id": "tooComplicatedTooManySteps",
"label":"Too complicated / too many steps"
},{
"type": "thumb-down",
"id": "outOfDate",
"label":"Out of date"
},{
"type": "thumb-down",
"id": "samplesCodeIssue",
"label":"Samples / code issue"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
{"lastModified": "Last updated 2024-04-26 UTC."}
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-04-26 UTC."],[],[]]