TensorFlow 2.0 Beta is available Learn more


Class Value

An abstract base class for all values in the bodies of TFF computations.

Inherits From: TypedObject

Defined in python/core/api/value_base.py.

This interface is only relevant in the context of non-TensorFlow computations, such as those that represent federated orchestration logic. The bodies of such computations will contain a mixture of federated communication operators, and calls to TensorFlow computations embedded in them as subcomponents. All values that appear in those computations implement this common interface, just like all values in TensorFlow computations appear as tensors.

Outside of the bodies of composite non-TensorFlow computations, this interface is not used. All fully constructed computations implement tff.Computation.



Returns the TFF type of this object (an instance of tff.Type).




For values of functional types, invokes this value on given arguments.



For values of a named tuple type, returns the element at index.



For values of a named tuple type, iterates over the tuple elements.



For values of a named tuple type, returns the number of elements.