LogSoftmax - 11 vs 13#
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.
- LogSoftmax11 → LogSoftmax13 +19 -10
LogSoftmax11 → LogSoftmax13
RENAMED
@@ -1 +1 @@
|
|
1
|
-
The operator computes the log of softmax values for the
|
1
|
+
The operator computes the logsoftmax (log of softmax) values for each layer in the batch
|
2
|
+
of the given input.
|
3
|
+
The input does not need to explicitly be a 2D vector; rather, it will be
|
2
|
-
|
4
|
+
coerced into one. For an arbitrary n-dimensional tensor
|
3
|
-
|
5
|
+
input in [a_0, a_1, ..., a_{k-1}, a_k, ..., a_{n-1}] and k is
|
4
|
-
|
6
|
+
the axis provided, then input will be coerced into a 2-dimensional tensor with
|
7
|
+
dimensions [a_0 * ... * a_{k-1}, a_k * ... * a_{n-1}]. For the default
|
8
|
+
case where axis=1, this means the input tensor will be coerced into a 2D tensor
|
9
|
+
of dimensions [a_0, a_1 * ... * a_{n-1}], where a_0 is often the batch size.
|
10
|
+
In this situation, we must have a_0 = N and a_1 * ... * a_{n-1} = D.
|
11
|
+
Each of these dimensions must be matched correctly, or else the operator
|
5
|
-
will
|
12
|
+
will throw errors. The output tensor has the same shape
|
6
|
-
and contains the
|
13
|
+
and contains the logsoftmax values of the corresponding input.
|
7
14
|
**Attributes**
|
8
15
|
* **axis**:
|
9
|
-
|
16
|
+
Describes the axis of the inputs when coerced to 2D; defaults to one
|
17
|
+
because the 0th axis most likely describes the batch_size. Negative
|
10
18
|
value means counting dimensions from the back. Accepted range is
|
11
19
|
[-r, r-1] where r = rank(input).
|
12
20
|
**Inputs**
|
13
21
|
* **input** (heterogeneous) - **T**:
|
14
|
-
The input tensor of
|
22
|
+
The input tensor that's coerced into a 2D matrix of size (NxD) as
|
23
|
+
described above.
|
15
24
|
**Outputs**
|
16
25
|
* **output** (heterogeneous) - **T**:
|
17
|
-
The output values with the same shape as
|
26
|
+
The output values with the same shape as input tensor (the original
|
27
|
+
size without coercion).
|
18
28
|
**Type Constraints**
|
19
29
|
* **T** in (
|
20
|
-
tensor(bfloat16),
|
21
30
|
tensor(double),
|
22
31
|
tensor(float),
|
23
32
|
tensor(float16)
|
24
33
|
):
|
25
34
|
Constrain input and output types to float tensors.
|