Thanks for tuning in to Google I/O. View all sessions on demandWatch on demand

tff.types.infer_unplaced_type

Infers the TFF type of the argument (a computation_types.Type instance).

The kinds of arguments that are currently correctly recognized:

  • tensors, variables, and data sets
  • things that are convertible to tensors (including numpy arrays, builtin types, as well as lists and tuples of any of the above, etc.)
  • nested lists, tuples, namedtuples, anonymous tuples, dict, OrderedDicts, dataclasses, attrs classes, and tff.TypedObjects

arg The argument, the TFF type of which to infer.

Either an instance of computation_types.Type, or None if the argument is None.