tf.compat.v1.tpu.rewrite

View source on GitHub

Rewrites computation for execution on a TPU system.

tf.compat.v1.tpu.rewrite(
    computation, inputs=None, infeed_queue=None, device_assignment=None, name=None
)

Args:

Returns:

Same data structure as if computation(*inputs) is called directly with some exceptions for correctness. Exceptions include: 1) None output: a NoOp would be returned which control-depends on computation. 2) Single value output: A tuple containing the value would be returned. 3) Operation-only outputs: a NoOp would be returned which control-depends on computation. TODO(b/121383831): Investigate into removing these special cases.