8.1.1.2.1.1.1.4. blueoil.converter.core.graph
¶
Graph module.
8.1.1.2.1.1.1.4.1. Module Contents¶
8.1.1.2.1.1.1.4.1.1. Classes¶
Graph class. This class was formerly named as ‘Nodes’. |
-
class
blueoil.converter.core.graph.
Graph
¶ Bases:
object
Graph class. This class was formerly named as ‘Nodes’.
-
__eq__
(self, other) → bool¶ Return the two graphs are equivalent.
-
get_op
(self, name: str) → Optional[Operator]¶
-
add_op
(self, op: Operator) → Operator¶
-
add_op_and_inputs
(self, op: Operator) → Operator¶ Add an operator and its inputs recursively.
- Parameters
op (Operator) –
-
remove_op
(self, op: Operator) → None¶
-
property
operators
(self) → List[Operator]¶ List up all operators in this graph.
-
get_inputs
(self) → List[Operator]¶
-
get_outputs
(self) → List[Operator]¶
-
property
consts
(self) → List[Operator]¶
-
property
non_variables
(self) → List[Operator]¶
-
find_node_by_op_type
(self, op_type: str) → List[Operator]¶ Find nodes which op_type is specified by the argument.
- Parameters
op_type (str) – Operator type of the nodes
- Returns
Operators that have the op_type
- Return type
list[str]
-
convs
(self, quantized_only: bool = False) → List[Conv]¶ Return the list of conv operators in this graph.
- Parameters
quantized_only (bool) – Flag that represents if the operators are only quantized ones (Default value = False)
- Returns
- Return type
list
-
check_nodes
(self) → bool¶ Check whether all operators defined in this graph.
Currently it checks: - for all operators op, for all input in op.inputs, input.outputs includes op.
Args:
- Returns
Whether the graph passes the test.
- Return type
bool
-