升级 opset 10 的 resize 到 opset 11
(self)
| 244 | op.attributes.clear() |
| 245 | |
| 246 | def format_resize(self) -> None: |
| 247 | """ |
| 248 | 升级 opset 10 的 resize 到 opset 11 |
| 249 | """ |
| 250 | for op in self.graph.operations.values(): |
| 251 | if op.type == 'Resize' and len(op.inputs) == 2: |
| 252 | # 创建一个空的 variable, 这个 variable 没有值与 source_op, 也不是 parameter |
| 253 | # 这种行为 Onnx 是允许的,这种变量用以传递空值,起到占位符的作用 |
| 254 | self.graph.create_variable(value=None, is_parameter=False, dest_ops=[op]) |
| 255 | op.inputs[1], op.inputs[2] = op.inputs[2], op.inputs[1] |
| 256 | |
| 257 | def format_clip(self) -> None: |
| 258 | """ |
no test coverage detected