|View source on GitHub|
A representation of data (an input pipeline).
tff.framework.Data( uri: str, type_spec: object )
This class does not deal with parsing data URIs and verifying correctness, it is only a container. Parsing and type analysis are a responsibility or a component external to this module.
||The URI that characterizes the data.|
||Either the types.Type that represents the type of this data, or something convertible to it by types.to_type().|
||if the arguments are of the wrong types.|
||if the user tries to specify an empty URI.|
||Returns a serialized form of this object as a pb.Computation instance.|
Returns the TFF type of this object (an instance of
Check that this is a 'Block'.
Check that this is a 'Call'.
Check that this is a 'CompiledComputation'.
Check that this is a 'Data'.
Check that this is an 'Intrinsic'.
Check that this is a 'Lambda'.
Check that this is a 'Placement'.
Check that this is a 'Reference'.
Check that this is a 'Selection'.
Check that this is a
children() -> Iterator[
Returns an iterator yielding immediate child building blocks.
Returns the compact string representation of this building block.
Returns the formatted string representation of this building block.
from_proto( computation_proto: pb.Computation ) -> 'Data'
Returns an instance of a derived class based on 'computation_proto'.
||An instance of pb.Computation.|
|An instance of a class that implements 'ComputationBuildingBlock' and that contains the deserialized logic from in 'computation_proto'.|
||if computation_proto contains a kind of computation for which deserialization has not been implemented yet.|
||if deserialization failed due to the argument being invalid.|
Returns the structural string representation of this building block.