Pow - 1 vs 12#

Next section compares an older to a newer version of the same operator after both definition are converted into markdown text. Green means an addition to the newer version, red means a deletion. Anything else is unchanged.

Files changed (1) hide show
  1. Pow1 → Pow12 +33 -22
Pow1 → Pow12 RENAMED
@@ -1 +1 @@
1
1
  Pow takes input data (Tensor<T>) and exponent Tensor, and
2
2
  produces one output data (Tensor<T>) where the function f(x) = x^exponent,
3
3
  is applied to the data tensor elementwise.
4
+
5
+ If necessary the right-hand-side argument will be broadcasted to match the
4
- This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>_.
6
+ shape of left-hand-side argument. When broadcasting is specified, the second
7
+ tensor can either be of element size 1 (including a scalar tensor and any
8
+ tensor with rank equal to or smaller than the first tensor), or having its
9
+ shape as a contiguous subset of the first tensor's shape. The starting of the
10
+ mutually equal shape is specified by the argument "axis", and if it is not set,
11
+ suffix matching is assumed. 1-dim expansion doesn't work yet.
12
+
13
+ For example, the following tensor shapes are supported (with broadcast=1):
14
+
15
+ shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar tensor
16
+ shape(A) = (2, 3, 4, 5), shape(B) = (1, 1), i.e. B is an 1-element tensor
17
+ shape(A) = (2, 3, 4, 5), shape(B) = (5,)
18
+ shape(A) = (2, 3, 4, 5), shape(B) = (4, 5)
19
+ shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1
20
+ shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0
21
+
22
+ Attribute broadcast=1 needs to be passed to enable broadcasting.
23
+
24
+ **Attributes**
25
+
26
+ * **axis**:
27
+ If set, defines the broadcast dimensions. See doc for details.
28
+ * **broadcast**:
29
+ Pass 1 to enable broadcasting
5
30
  **Inputs**
6
31
  * **X** (heterogeneous) - **T**:
7
- First operand, base of the exponent.
32
+ Input tensor of any shape, base of the exponent.
8
- * **Y** (heterogeneous) - **T1**:
33
+ * **Y** (heterogeneous) - **T**:
9
- Second operand, power of the exponent.
34
+ Input tensor of any shape broadcastable to X shape, the exponent
35
+ component.
10
36
  **Outputs**
11
37
  * **Z** (heterogeneous) - **T**:
12
- Output tensor.
38
+ Output tensor (same size as X)
13
39
  **Type Constraints**
14
40
  * **T** in (
15
41
  tensor(double),
16
42
  tensor(float),
17
- tensor(float16),
43
+ tensor(float16)
18
- tensor(int32),
19
- tensor(int64)
20
44
  ):
21
- Constrain input X and output types to float/int tensors.
45
+ Constrain input and output types to float tensors.- * **T1** in (
22
- tensor(double),
23
- tensor(float),
24
- tensor(float16),
25
- tensor(int16),
26
- tensor(int32),
27
- tensor(int64),
28
- tensor(int8),
29
- tensor(uint16),
30
- tensor(uint32),
31
- tensor(uint64),
32
- tensor(uint8)
33
- ):
34
- Constrain input Y types to float/int tensors.