tf_agents.eval.metric_utils.compute_summaries
Stay organized with collections
Save and categorize content based on your preferences.
Compute metrics using policy
on the environment
and logs summaries.
tf_agents.eval.metric_utils.compute_summaries(
metrics,
environment,
policy,
num_episodes=1,
global_step=None,
tf_summaries=True,
log=False,
callback=None
)
Args |
metrics
|
List of metrics to compute.
|
environment
|
py_environment instance.
|
policy
|
py_policy instance used to step the environment. A tf_policy can be
used in_eager_mode.
|
num_episodes
|
Number of episodes to compute the metrics over.
|
global_step
|
An optional global step for summaries.
|
tf_summaries
|
If True, write TF summaries for each computed metric.
|
log
|
If True, log computed metrics.
|
callback
|
If provided, this function is called with (computed_metrics,
global_step).
|
Returns |
A dictionary of results {metric_name: metric_value}
|
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.
[[["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."],[],[]]