Conceptually tracks indices of arguments of "OpHint functions".
tf.compat.v1.lite.OpHint.OpHintArgumentTracker(
function_name,
unique_function_id,
node_name_prefix,
attr_name,
level=1,
children_inputs_mappings=None
)
The inputs and arguments of these functions both use an instance of the class so they can have independent numbering.
Methods
add
add(
arg, tag=None, name=None, aggregate=None, index_override=None
)
Return a wrapped tensor of an input tensor as an argument.
Args | |
---|---|
arg
|
A TensorFlow tensor that should be considered an argument. |
tag
|
String tag to identify arguments that should be packed. |
name
|
Name of argument. This is included in the Identity hint op names. |
aggregate
|
Strategy to aggregate. Acceptable values are OpHint.AGGREGATE_FIRST, OpHint.AGGREGATE_LAST, and OpHint.AGGREGATE_STACK. Note, aggregate is only valid if tag is specified. |
index_override
|
Specify what input/output index should this be in the final stub. i.e. add(arg0, index=1); add(arg1, index=0) will make the final stub be as stub_func(inputs[arg1, arg0], outputs=[]) rather than the default call order based ordering. |
Returns | |
---|---|
A tensor representing the wrapped argument. |
Raises | |
---|---|
ValueError
|
When indices are not consistent. |