tf.contrib.tpu.rewrite( computation, inputs=None, infeed_queue=None, device_assignment=None, name=None )
Defined in tensorflow/contrib/tpu/python/tpu/tpu.py
.
Rewrites computation
for execution on a TPU system.
computation
: A Python function that builds a computation to apply to the input. If the function takes n inputs, 'inputs' should be a list of n tensors. If the function returns m outputs, rewrite will return a list of m tensors.inputs
: A list of input tensors or None
(equivalent to an empty list).infeed_queue
: If not None
, the InfeedQueue
from which to append a tuple of arguments as inputs to computation
.device_assignment
: if not None
, a DeviceAssignment
describing the mapping between logical cores in the computation with physical cores in the TPU topology. May be omitted for a single-core computation, in which case the core attached to task 0, TPU device 0 is used.name
: (Deprecated) Does nothing.A list of output tensors.
© 2018 The TensorFlow Authors. All rights reserved.
Licensed under the Creative Commons Attribution License 3.0.
Code samples licensed under the Apache 2.0 License.
https://www.tensorflow.org/api_docs/python/tf/contrib/tpu/rewrite