ReduceLogSumExp - 1 vs 18¶
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.
ReduceLogSumExp1 → ReduceLogSumExp18
RENAMED
@@ -1 +1 @@
|
|
1
|
-
Computes the log sum exponent of the input tensor's
|
1
|
+
Computes the log sum exponent of the input tensor's elements along the provided axes. The resulting
|
2
|
-
tensor has the same rank as the input if keepdims equals 1. If keepdims
|
2
|
+
tensor has the same rank as the input if keepdims equals 1. If keepdims equals 0, then
|
3
|
-
the
|
3
|
+
the resulting tensor has the reduced dimension pruned. Input tensors of rank zero are
|
4
4
|
valid. Reduction over an empty set of values yields minus infinity (if supported by the datatype) or undefined otherwise.
|
5
|
-
The above behavior is similar to numpy, with the exception that numpy defaults keepdims
|
5
|
+
The above behavior is similar to numpy, with the exception that numpy defaults keepdims
|
6
|
-
False instead of True.
|
6
|
+
to False instead of True.
|
7
|
+
|
8
|
+
#### Function Body
|
9
|
+
|
10
|
+
The function definition for this operator.
|
11
|
+
|
12
|
+
|
13
|
+
<
|
14
|
+
domain: "",
|
15
|
+
opset_import: ["" : 18]
|
16
|
+
>
|
17
|
+
ReduceLogSumExp <noop_with_empty_axes,keepdims>(data, axes) => (reduced)
|
18
|
+
{
|
19
|
+
data_double = Cast <to: int = 11> (data)
|
20
|
+
data_exp = Exp (data_double)
|
21
|
+
reduced_sum = ReduceSum <keepdims: int = @keepdims> (data_exp, axes)
|
22
|
+
reduced_double = Log (reduced_sum)
|
23
|
+
reduced = CastLike (reduced_double, data)
|
24
|
+
}
|
25
|
+
|
7
26
|
### Attributes
|
8
|
-
|
9
|
-
* **axes - INTS** :
|
10
|
-
|
11
|
-
A list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor.
|
12
27
|
* **keepdims - INT** (default is '1'):
|
13
28
|
Keep the reduced dimension or not, default 1 means keep reduced dimension.
|
29
|
+
* **noop_with_empty_axes - INT** (default is '0'):
|
30
|
+
|
31
|
+
Defines behavior if 'axes' is empty. Default behavior with 'false' is to reduce all axes. When axes is empty and this attribute is set to true, input tensor will not be reduced,and the output tensor would be equivalent to input tensor.
|
32
|
+
|
14
33
|
### Inputs
|
34
|
+
|
35
|
+
Between 1 and 2 inputs.
|
15
36
|
- **data** (heterogeneous) - **T**:
|
16
37
|
An input tensor.
|
38
|
+
- **axes** (optional, heterogeneous) - **tensor(int64)**:
|
39
|
+
|
40
|
+
Optional input list of integers, along which to reduce. The default is to reduce over all the dimensions of the input tensor if 'noop_with_empty_axes' is false, else act as an Identity op when 'noop_with_empty_axes' is true. Accepted range is [-r, r-1] where r = rank(data).
|
17
41
|
### Outputs
|
18
42
|
- **reduced** (heterogeneous) - **T**:
|
19
43
|
Reduced output tensor.
|
20
44
|
### Type Constraints
|
21
|
-
* **T** in ( tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64) ):
|
45
|
+
* **T** in ( tensor(bfloat16), tensor(double), tensor(float), tensor(float16), tensor(int32), tensor(int64), tensor(uint32), tensor(uint64) ):
|
22
|
-
Constrain input and output types to
|
46
|
+
Constrain input and output types to numeric tensors.
|