Join us at TensorFlow World, Oct 28-31. Use code TF20 for 20% off select passes. Register now


View source

Returns nested structure of tf.TensorSpecs for a given TFF type.


The dtypes and shapes of the returned tf.TensorSpecs match those used by to indicate the type and shape of their elements. They can be used, e.g., as arguments in constructing an iterator over a string handle.


  • type_spec: Type specification, either an instance of computation_types.Type, or something convertible to it. Ther type specification must be composed of only named tuples and tensors. In all named tuples that appear in the type spec, all the elements must be named.


A nested structure of tf.TensorSpecs with the dtypes and shapes of tensors defined in type_spec. The layout of the structure returned is the same as the layout of the nested type defined by type_spec. Named tuples are represented as dictionaries.