-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1. Add opset 12 support for Einsum 2. Skip dropout, if and loop onnx-backend-test 3. Fix acosh, reduce_sum, split, squeeze and topk testcase in test_node.py Signed-off-by: Winnie Tsang <[email protected]>
- Loading branch information
1 parent
6ed3bf2
commit 651c90f
Showing
4 changed files
with
34 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import tensorflow as tf | ||
|
||
from onnx_tf.handlers.backend_handler import BackendHandler | ||
from onnx_tf.handlers.handler import onnx_op | ||
|
||
@onnx_op("Einsum") | ||
|
||
class Einsum(BackendHandler): | ||
|
||
@classmethod | ||
def version_12(cls, node, **kwargs): | ||
equation = node.attrs.get("equation", "") | ||
inputs = [kwargs["tensor_dict"][inp] for inp in node.inputs] | ||
return [tf.einsum(equation, *inputs)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters