Stay organized with collections Save and categorize content based on your preferences.

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.