Module: tff.learning.metrics
Stay organized with collections
Save and categorize content based on your preferences.
Libraries for working with metrics in federated learning algorithms.
Classes
class FinalizeThenSampleFactory
: Aggregation Factory that finalizes and then samples the metrics.
class MetricsAggregatorType
: Base class for protocol classes.
class NumBatchesCounter
: A tf.keras.metrics.Metric
that counts the number of batches seen.
class NumExamplesCounter
: A tf.keras.metrics.Metric
that counts the number of examples seen.
class SecureSumFactory
: Aggregation Factory that performs secure summation over metrics.
class SumThenFinalizeFactory
: Aggregation Factory that sums and then finalizes the metrics.
Functions
create_default_secure_sum_quantization_ranges(...)
: Create a nested structure of quantization ranges for secure sum encoding.
create_functional_metric_fns(...)
: Turn a Keras metric construction method into a tuple of pure functions.
create_keras_metric_finalizer(...)
: Creates a finalizer function for the given Keras metric.
finalize_then_sample(...)
: Creates a TFF computation to aggregate metrics via finalize_then_sample
.
secure_sum_then_finalize(...)
: Creates a TFF computation that aggregates metrics using secure summation.
sum_then_finalize(...)
: Creates a TFF computation that aggregates metrics via sum_then_finalize
.
Type Aliases
FunctionalMetricFinalizersType
MetricFinalizersType
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-09-20 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-09-20 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-09-20 UTC."],[],[]]