A class that helps build tflite function invocations.
It allows you to take a bunch of TensorFlow ops and annotate the construction such that toco knows how to convert it to tflite. This embeds a pseudo function in a TensorFlow graph. This allows embedding high-level API usage information in a lower level TensorFlow implementation so that an alternative implementation can be substituted later.
Essentially, any "input" into this pseudo op is fed into an identity, and attributes are added to that input before being used by the constituent ops that make up the pseudo op. A similar process is done to any output that is to be exported from the current op.
TODO(aselle): When TensorFlow functions functionality works for arbitrary constructs, this mechanism can be retired and changed to use python defun's.
__init__( function_name, **kwargs )
Create a OpHint.
function_name: Name of the function (the custom op name in tflite)
**kwargs: Keyword arguments of any constant attributes for the function.
Add a sequence of inputs to the function invocation.
*args: List of inputs to be converted (should be Tf.Tensor).
Wrapped inputs (identity standins that have additional metadata). These are also are also tf.Tensor's.
Add a sequence of outputs to the function invocation.
*args: List of outputs to be converted (should be tf.Tensor).
Wrapped outputs (identity standins that have additional metadata). These are also tf.Tensor's.