(
self,
name: str = "",
op: str = "",
inputs: List[str] = [],
output_nodes: List[str] = [],
tensors: Dict[str, List[str]] = {},
)
| 37 | |
| 38 | class SimpleNode: |
| 39 | def __init__( |
| 40 | self, |
| 41 | name: str = "", |
| 42 | op: str = "", |
| 43 | inputs: List[str] = [], |
| 44 | output_nodes: List[str] = [], |
| 45 | tensors: Dict[str, List[str]] = {}, |
| 46 | ): |
| 47 | self.name = name |
| 48 | self.op = op |
| 49 | self.inputs = inputs |
| 50 | # Input tensors. |
| 51 | self.inputs_tensors = [get_canonical_tensor_name(n) for n in inputs] |
| 52 | # Output nodes. |
| 53 | self.output_nodes = output_nodes.copy() |
| 54 | # Mapping from output tensor name to list of nodes that consume this tensor. |
| 55 | self.tensors = tensors.copy() |
| 56 | |
| 57 | @property |
| 58 | def num_inputs(self) -> int: |
nothing calls this directly
no test coverage detected