MCPcopy
hub / github.com/OpenPPL/ppq / remove_identity

Method remove_identity

ppq/IR/morph.py:486–492  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

484 operation.inputs.append(var)
485
486 def remove_identity(self):
487 removing_ops = []
488 for op in self.graph.operations.values():
489 if op.type == 'Identity': removing_ops.append(op)
490
491 for op in removing_ops:
492 self.graph.remove_operation(op, keep_coherence=True)
493
494 def convert_to_tensor(self):
495 """ Convert anything inside your network to torch tensor. (Usually from numpy)"""

Callers 1

processMethod · 0.95

Calls 2

remove_operationMethod · 0.80
appendMethod · 0.45

Tested by

no test coverage detected