Pow - 1 vs 7#
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.
- Pow1 → Pow7 +30 -4
Pow1 → Pow7
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
|
-
|
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
|
-
|
32
|
+
Input tensor of any shape, base of the exponent.
|
8
33
|
* **Y** (heterogeneous) - **T**:
|
9
|
-
|
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
43
|
tensor(float16)
|
18
44
|
):
|
19
45
|
Constrain input and output types to float tensors.
|