@@ -56,10 +56,6 @@ def __init__(self, target_point: ONNXTargetPoint, input_edges_mapping: Dict[str,
56
56
# need to keep the mapping NNCF input nodes to the following ONNX nodes.
57
57
self .input_edges_mapping = input_edges_mapping
58
58
59
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
60
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
61
- raise NotImplementedError ()
62
-
63
59
64
60
class ONNXQuantizerInsertionCommand (ONNXInsertionCommand ):
65
61
def __init__ (
@@ -71,15 +67,10 @@ def __init__(
71
67
super ().__init__ (target_point , nncf_input_node_next_onnx_nodes )
72
68
self .quantizer_parameters = quantizer_parameters
73
69
74
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
75
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
76
- raise NotImplementedError ()
77
-
78
70
79
71
class ONNXOutputInsertionCommand (ONNXInsertionCommand ):
80
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
81
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
82
- raise NotImplementedError ()
72
+ def __init__ (self , target_point : ONNXTargetPoint , input_edges_mapping : Dict [str , Tuple [str , int ]]):
73
+ super ().__init__ (TransformationType .INSERT , target_point , input_edges_mapping )
83
74
84
75
85
76
class ONNXBiasCorrectionCommand (TransformationCommand ):
@@ -95,10 +86,6 @@ def __init__(self, target_point: ONNXTargetPoint, bias_value: np.ndarray):
95
86
super ().__init__ (TransformationType .CHANGE , target_point )
96
87
self .bias_value = bias_value
97
88
98
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
99
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
100
- raise NotImplementedError ()
101
-
102
89
103
90
class ONNXModelExtractionCommand (Command ):
104
91
"""
@@ -114,10 +101,6 @@ def __init__(self, inputs: List[str], outputs: List[str]):
114
101
self .inputs = inputs
115
102
self .outputs = outputs
116
103
117
- def union (self , other : "Command" ) -> "Command" :
118
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
119
- raise NotImplementedError ()
120
-
121
104
122
105
class ONNXQDQNodeRemovingCommand (TransformationCommand ):
123
106
"""
@@ -130,10 +113,6 @@ def __init__(self, target_point: ONNXTargetPoint):
130
113
"""
131
114
super ().__init__ (TransformationType .REMOVE , target_point )
132
115
133
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
134
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
135
- raise NotImplementedError ()
136
-
137
116
138
117
class ONNXNullBiasInsertionCommand (TransformationCommand ):
139
118
"""
@@ -145,7 +124,3 @@ def __init__(self, target_point: ONNXTargetPoint):
145
124
:param target_point: The TargetPoint instance for the insertion that contains layer's information.
146
125
"""
147
126
super ().__init__ (TransformationType .INSERT , target_point )
148
-
149
- def union (self , other : "TransformationCommand" ) -> "TransformationCommand" :
150
- # Have a look at nncf/torch/graph/transformations/commands/PTInsertionCommand
151
- raise NotImplementedError ()
0 commit comments