MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _LiteSingleOperand

Class _LiteSingleOperand

tensorflow/lite/python/op_hint.py:512–535  ·  view source on GitHub ↗

A simple operand that is non-aggregated (i.e. most hints).

Source from the content-addressed store, hash-verified

510
511
512class _LiteSingleOperand(_LiteOperand):
513 """A simple operand that is non-aggregated (i.e. most hints)."""
514
515 def __init__(self, node):
516 _LiteOperand.__init__(self)
517 self.node = node
518 self.name = _tensor_name_base(node.name)
519
520 def flatten(self):
521 return [self.name]
522
523 def aggregate_and_return_name_for_input(self, out_graphdef):
524 return self.name
525
526 def aggregate_and_return_name_for_output(self, fused_op_name, index,
527 out_graphdef):
528 output_node = _copy.deepcopy(self.node)
529 del output_node.input[:]
530 output_node.input.append(_tensorflow_output_name(fused_op_name, index))
531 out_graphdef.node.extend([output_node])
532 return self.node.attr["type"].i
533
534 def __str__(self):
535 return str(self.name)
536
537
538class _LiteAggregateOperand(_LiteOperand):

Callers 2

put_operandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected