View source on GitHub |
Infers the variable types of a given program.
tfp.experimental.auto_batching.type_inference.infer_types_from_signature(
program, sig, backend
)
Args | |
---|---|
program
|
instructions.Program whose types to infer.
|
sig
|
A list of (patterns of) instructions.TensorType aligned with
program.vars_in .
|
backend
|
Backend implementation. |
Returns | |
---|---|
typed
|
instructions.Program with types inferred.
|
Raises | |
---|---|
ValueError
|
If some types still remain incomplete after inference. |