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}
|