TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now

tfp.experimental.auto_batching.instructions.Function

View source on GitHub

Class Function

A function subject to auto-batching, callable with FunctionCallOp.

Aliases:

__init__

View source

__init__(
    graph,
    vars_in,
    vars_out,
    type_inference,
    name=None
)

A Function is a control flow graph with input and output variables.

Args:

  • graph: A ControlFlowGraph comprising the function's body.
  • vars_in: List of string giving the names of the formal parameters of the function.
  • vars_out: Pattern of string giving the name(s) of the variables the function returns. Ergo, functions must be canonicalized to place the return value(s) in the same-named variable(s) along every path to the exit.
  • type_inference: A callable which takes a list of patterns of TensorTypes corresponding to the data types of vars_in. This callable must return a pattern of TensorTypes corresponding to the structure assembled by the return_vars.
  • name: Optional string denoting this Function in printed output.

Properties

name