|
22 | 22 |
|
23 | 23 | # pylint: disable=unused-argument,missing-docstring
|
24 | 24 |
|
25 |
| -@tf_op(["Add", "AddV2", "Div", "Mul", "Sub", "LessOrEqual"]) |
| 25 | +@tf_op(["Add", "AddV2", "Div", "Mul", "Sub"]) |
26 | 26 | class BroadcastOp(common.BroadcastOp):
|
27 | 27 | pass
|
28 | 28 |
|
@@ -545,25 +545,19 @@ def version_11(cls, ctx, node, **kwargs):
|
545 | 545 | ctx.set_dtype(cast_back_node.output[0], dtypes[0])
|
546 | 546 | ctx.copy_shape(node.name, cast_back_node.output[0])
|
547 | 547 |
|
548 |
| -@tf_op("MatrixInverse") |
549 |
| -class Inverse: |
550 | 548 |
|
| 549 | +@tf_op("MatrixInverse", onnx_op="Inverse") |
| 550 | +class Inverse: |
551 | 551 | @classmethod
|
552 | 552 | def version_12(cls, ctx, node, **kwargs):
|
553 | 553 | utils.make_sure(node.get_attr('adjoint').i == 0, "adjoint must be false")
|
554 |
| - shapes = node.output_shapes |
555 |
| - dtypes = node.output_dtypes |
556 |
| - ctx.remove_node(node.name) |
557 |
| - ctx.make_node("Inverse", inputs=node.input, outputs=node.output, name=node.name, |
558 |
| - domain=constants.MICROSOFT_DOMAIN, shapes=shapes, dtypes=dtypes) |
| 554 | + del node.attr["adjoint"] |
| 555 | + node.domain = constants.MICROSOFT_DOMAIN |
559 | 556 |
|
560 |
| -@tf_op("SquaredDistance") |
561 |
| -class SquaredDistance: |
562 | 557 |
|
| 558 | +@tf_op("SquaredDistance", onnx_op="MeanSquaredDistance") |
| 559 | +class SquaredDistance: |
563 | 560 | @classmethod
|
564 | 561 | def version_12(cls, ctx, node, **kwargs):
|
565 |
| - shapes = node.output_shapes |
566 |
| - dtypes = node.output_dtypes |
567 |
| - ctx.remove_node(node.name) |
568 |
| - ctx.make_node("MeanSquaredDistance", inputs=node.input, outputs=node.output, name=node.name, |
569 |
| - shapes=shapes, dtypes=dtypes, attr={"reduction": "none"}) |
| 562 | + node.attr["reduction"] = "none" |
| 563 | + |
0 commit comments