tf_agents.eval.metric_utils.eager_compute
Compute metrics using policy
on the environment
.
tf_agents.eval.metric_utils.eager_compute(
metrics,
environment,
policy,
num_episodes=1,
train_step=None,
summary_writer=None,
summary_prefix='',
use_function=True
)
Args |
metrics
|
List of metrics to compute.
|
environment
|
tf_environment instance.
|
policy
|
tf_policy instance used to step the environment.
|
num_episodes
|
Number of episodes to compute the metrics over.
|
train_step
|
An optional step to write summaries against.
|
summary_writer
|
An optional writer for generating metric summaries.
|
summary_prefix
|
An optional prefix scope for metric summaries.
|
use_function
|
Option to enable use of tf.function when collecting the
metrics.
|
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.
[null,null,["Last updated 2024-04-26 UTC."],[],[]]