TensorFlow 2.0 RC is available Learn more

tff.Value

View source

Class Value

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

Inherits From: TypedObject

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.

Properties

type_signature

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

Methods

__call__

View source

__call__(
    *args,
    **kwargs
)

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

__getitem__

View source

__getitem__(index)

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

__iter__

View source

__iter__()

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

__len__

View source

__len__()

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