tf.contrib.metrics.aggregate_metric_map
Stay organized with collections
Save and categorize content based on your preferences.
Aggregates the metric names to tuple dictionary.
tf.contrib.metrics.aggregate_metric_map(
names_to_tuples
)
This function is useful for pairing metric names with their associated value
and update ops when the list of metrics is long. For example:
metrics_to_values, metrics_to_updates = slim.metrics.aggregate_metric_map({
'Mean Absolute Error': new_slim.metrics.streaming_mean_absolute_error(
predictions, labels, weights),
'Mean Relative Error': new_slim.metrics.streaming_mean_relative_error(
predictions, labels, labels, weights),
'RMSE Linear': new_slim.metrics.streaming_root_mean_squared_error(
predictions, labels, weights),
'RMSE Log': new_slim.metrics.streaming_root_mean_squared_error(
predictions, labels, weights),
})
Args |
names_to_tuples
|
a map of metric names to tuples, each of which contain the
pair of (value_tensor, update_op) from a streaming metric.
|
Returns |
A dictionary from metric names to value ops and a dictionary from metric
names to update ops.
|
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 2020-10-01 UTC.
[null,null,["Last updated 2020-10-01 UTC."],[],[],null,["# tf.contrib.metrics.aggregate_metric_map\n\n\u003cbr /\u003e\n\n|------------------------------------------------------------------------------------------------------------------------------------------------|\n| [View source on GitHub](https://github.com/tensorflow/tensorflow/blob/v1.15.0/tensorflow/contrib/metrics/python/ops/metric_ops.py#L3691-L3720) |\n\nAggregates the metric names to tuple dictionary. \n\n tf.contrib.metrics.aggregate_metric_map(\n names_to_tuples\n )\n\nThis function is useful for pairing metric names with their associated value\nand update ops when the list of metrics is long. For example: \n\n metrics_to_values, metrics_to_updates = slim.metrics.aggregate_metric_map({\n 'Mean Absolute Error': new_slim.metrics.streaming_mean_absolute_error(\n predictions, labels, weights),\n 'Mean Relative Error': new_slim.metrics.streaming_mean_relative_error(\n predictions, labels, labels, weights),\n 'RMSE Linear': new_slim.metrics.streaming_root_mean_squared_error(\n predictions, labels, weights),\n 'RMSE Log': new_slim.metrics.streaming_root_mean_squared_error(\n predictions, labels, weights),\n })\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Args ---- ||\n|-------------------|-----------------------------------------------------------------------------------------------------------------------|\n| `names_to_tuples` | a map of metric names to tuples, each of which contain the pair of (value_tensor, update_op) from a streaming metric. |\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n| Returns ------- ||\n|---|---|\n| A dictionary from metric names to value ops and a dictionary from metric names to update ops. ||\n\n\u003cbr /\u003e"]]