File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change @@ -76,3 +76,32 @@ operator `+` to be available as well and that the case. They are
76
76
defined in class :class: `Var <onnx_array_api.light_api.Var> ` or
77
77
:class: `Vars <onnx_array_api.light_api.Vars> ` depending on the number of
78
78
inputs they require. Their name starts with a lower letter.
79
+
80
+ Other domains
81
+ =============
82
+
83
+ The following example uses operator *Normalizer * from domain
84
+ *ai.onnx.ml *. The operator name is called with the syntax
85
+ `<domain>.<operator name> `. The domain may have dots in its name
86
+ but it must follow the python definition of a variable.
87
+ The operator *Normalizer * becomes `ai.onnx.ml.Normalizer `.
88
+
89
+ .. runpython ::
90
+ :showcode:
91
+
92
+ import numpy as np
93
+ from onnx_array_api.light_api import start
94
+ from onnx_array_api.plotting.text_plot import onnx_simple_text_plot
95
+
96
+ model = (
97
+ start(opset=19, opsets={"ai.onnx.ml": 3})
98
+ .vin("X")
99
+ .reshape((-1, 1))
100
+ .rename("USE")
101
+ .ai.onnx.ml.Normalizer(norm="MAX")
102
+ .rename("Y")
103
+ .vout()
104
+ .to_onnx()
105
+ )
106
+
107
+ print(onnx_simple_text_plot(model))
You can’t perform that action at this time.
0 commit comments