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