Attend the Women in ML Symposium on December 7 Register now

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 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_keras_metric_finalizer(...): Creates a finalizer function for the given Keras metric.

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.