Watch talks from the 2019 TensorFlow Dev Summit Watch now

tff.NamedTupleType

Class NamedTupleType

Inherits From: Type

Defined in core/api/computation_types.py.

An implementation of tff.Type representing named tuple types in TFF.

__init__

__init__(elements)

Constructs a new instance from the given element types.

Args:

  • elements: Element specifications, in the format of a list, tuple, or collections.OrderedDict. Each element specification is either a type spec (an instance of tff.Type or something convertible to it via tff.to_type) for the element, or a (name, spec) for elements that have defined names. Alternatively, one can supply here an instance of collections.OrderedDict mapping element names to their types (or things that are convertible to types).

Methods

__dir__

__dir__()

__eq__

__eq__(other)

__getattr__

__getattr__(name)

__getitem__

__getitem__(key)

__iter__

__iter__()

__len__

__len__()

__ne__

__ne__(other)