tff.program.FederatedDataSourceIterator  |  TensorFlow Federated (original) (raw)

tff.program.FederatedDataSourceIterator

Stay organized with collections Save and categorize content based on your preferences.

An abstract interface for representing federated data source iterators.

This interface abstracts away the specifics of iterating over data in a data source.

Things one can do with a data source iterator:

Please see tff.program.FederatedDataSource for additional context and the high-level description of how to use data sources.

Attributes
federated_type The type of the data returned by calling select.

Methods

from_bytes

View source

@classmethod @abc.abstractmethod from_bytes( buffer: bytes ) -> 'Serializable'

Deserializes the object from bytes.

select

View source

@abc.abstractmethod select( k: Optional[int] = None ) -> object

Returns a new selection of federated data from this iterator.

Args
k An optional number of elements to select. Must be a positive integer, or None if unspecified.
Returns
An object of type federated_type representing the selected data, and that can be supplied as an argument to a tff.Computation. Seetff.program.FederatedContext for more information about these types.

to_bytes

View source

@abc.abstractmethod to_bytes() -> bytes

Serializes the object to bytes.

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.