ML Community Day is November 9! Join us for updates from TensorFlow, JAX, and more Learn more

tff.framework.ConcreteComputation

A representation of a pb.Computation in the tff.Computation interface.

Inherits From: Computation, TypedObject

This implementation exposes methods to retrieve the backing pb.Computation, as well as the Python representation of this protocol buffer represented by an instance of building_blocks.ComputationBuildingBlock. Leverages the implementation of __call__ inherited from function_utils.ConcreteFunction to pass self to the currently installed context.

computation_proto The protocol buffer that represents the computation, an instance of pb.Computation.
context_stack The context stack to use.
annotated_type Optional, type information with additional annotations that replaces the information in computation_proto.type.

TypeError if annotated_type is not None and is not compatible with computation_proto.type.

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

Methods

get_proto

View source

to_building_block

View source

to_compiled_building_block

View source

__call__

View source

Invokes the computation with the given arguments in the given context.

Args
*args The positional arguments.
**kwargs The keyword-based arguments.

Returns
The result of invoking the computation, the exact form of which depends on the context.

__eq__

View source

Return self==value.