Compress - 9 vs 11¶
- Compress9 → Compress11 +4 -2
Compress9 → Compress11
RENAMED
@@ -1 +1 @@
|
|
1
1
|
Selects slices from an input tensor along a given axis where condition evaluates to True for each axis index.
|
2
2
|
In case axis is not provided, input is flattened before elements are selected.
|
3
3
|
Compress behaves like numpy.compress: https://docs.scipy.org/doc/numpy/reference/generated/numpy.compress.html
|
4
4
|
**Attributes**
|
5
5
|
* **axis**:
|
6
6
|
(Optional) Axis along which to take slices. If not specified, input
|
7
|
-
is flattened before elements being selected.
|
7
|
+
is flattened before elements being selected. Negative value means
|
8
|
+
counting dimensions from the back. Accepted range is [-r, r-1] where
|
9
|
+
r = rank(input).
|
8
10
|
**Inputs**
|
9
11
|
* **input** (heterogeneous) - **T**:
|
10
12
|
Tensor of rank r >= 1.
|
11
13
|
* **condition** (heterogeneous) - **T1**:
|
12
14
|
Rank 1 tensor of booleans to indicate which slices or data elements
|
13
|
-
to be selected. Its length can be less than the input length
|
15
|
+
to be selected. Its length can be less than the input length along
|
14
16
|
the axis or the flattened input size if axis is not specified. In
|
15
17
|
such cases data slices or elements exceeding the condition length
|
16
18
|
are discarded.
|
17
19
|
**Outputs**
|
18
20
|
* **output** (heterogeneous) - **T**:
|
19
21
|
Tensor of rank r if axis is specified. Otherwise output is a Tensor
|
20
22
|
of rank 1.
|
21
23
|
**Type Constraints**
|
22
24
|
* **T** in (
|
23
25
|
tensor(bool),
|
24
26
|
tensor(complex128),
|
25
27
|
tensor(complex64),
|
26
28
|
tensor(double),
|
27
29
|
tensor(float),
|
28
30
|
tensor(float16),
|
29
31
|
tensor(int16),
|
30
32
|
tensor(int32),
|
31
33
|
tensor(int64),
|
32
34
|
tensor(int8),
|
33
35
|
tensor(string),
|
34
36
|
tensor(uint16),
|
35
37
|
tensor(uint32),
|
36
38
|
tensor(uint64),
|
37
39
|
tensor(uint8)
|
38
40
|
):
|
39
41
|
Constrain input and output types to all tensor types.
|
40
42
|
* **T1** in (
|
41
43
|
tensor(bool)
|
42
44
|
):
|
43
45
|
Constrain to boolean tensors.
|