tff.FederatedType

Class FederatedType

Inherits From: Type

Defined in core/api/computation_types.py.

An implementation of tff.Type representing federated types in TFF.

__init__

__init__(
    member,
    placement,
    all_equal=False
)

Constructs a new federated type instance.

Args:

  • member: An instance of tff.Type (or something convertible to it) that represents the type of the member components of each value of this federated type.
  • placement: The specification of placement that the member components of this federated type are hosted on. Must be either a placement literal such as tff.SERVER or tff.CLIENTS to refer to a globally defined placement, or a placement label to refer to a placement defined in other parts of a type signature. Specifying placement labels is not implemented yet.
  • all_equal: A bool value that indicates whether all members of the federated type are equal (True), or are allowed to differ (False).

Properties

all_equal

member

placement

Methods

__eq__

__eq__(other)

__ne__

__ne__(other)