tf.compat.v1.lite.OpHint.OpHintArgumentTracker
Stay organized with collections
Save and categorize content based on your preferences.
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.
Args |
function_name
|
Name of the function that this tracks arguments for.
|
unique_function_id
|
UUID of function that this tracks arguments for.
|
node_name_prefix
|
How identities that are created are named.
|
attr_name
|
Name of attribute to use to store the index for this hint.
i.e. FUNCTION_INPUT_INDEX or FUNCTION_OUTPUT_INDEX
|
level
|
Hierarchical level of the Ophint node, a number.
|
children_inputs_mappings
|
Inputs/Outputs mapping for children hints.
|
Methods
add
View source
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.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2023-10-06 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2023-10-06 UTC."],[],[]]