Cast - 1 vs 6#
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.
- Cast1 → Cast6 +0 -0
Cast1 → Cast6
RENAMED
@@ -1 +1 @@
|
|
1
1
|
The operator casts the elements of a given input tensor to a data type
|
2
2
|
specified by the 'to' argument and returns an output tensor of the same size in
|
3
3
|
the converted type. The 'to' argument must be one of the data types specified
|
4
4
|
in the 'DataType' enum field in the TensorProto message.
|
5
5
|
NOTE: Casting to and from strings is not supported yet.
|
6
6
|
**Attributes**
|
7
7
|
* **to** (required):
|
8
8
|
The data type to which the elements of the input tensor are cast.
|
9
9
|
Strictly must be one of the types from DataType enum in TensorProto
|
10
10
|
**Inputs**
|
11
11
|
* **input** (heterogeneous) - **T1**:
|
12
12
|
Input tensor to be cast.
|
13
13
|
**Outputs**
|
14
14
|
* **output** (heterogeneous) - **T2**:
|
15
15
|
Output tensor with the same shape as input with type specified by
|
16
16
|
the 'to' argument
|
17
17
|
**Type Constraints**
|
18
18
|
* **T1** in (
|
19
19
|
tensor(bool),
|
20
20
|
tensor(double),
|
21
21
|
tensor(float),
|
22
22
|
tensor(float16),
|
23
23
|
tensor(int16),
|
24
24
|
tensor(int32),
|
25
25
|
tensor(int64),
|
26
26
|
tensor(int8),
|
27
27
|
tensor(uint16),
|
28
28
|
tensor(uint32),
|
29
29
|
tensor(uint64),
|
30
30
|
tensor(uint8)
|
31
31
|
):
|
32
32
|
Constrain input types. Casting from strings and complex are not
|
33
33
|
supported.
|
34
34
|
* **T2** in (
|
35
35
|
tensor(bool),
|
36
36
|
tensor(double),
|
37
37
|
tensor(float),
|
38
38
|
tensor(float16),
|
39
39
|
tensor(int16),
|
40
40
|
tensor(int32),
|
41
41
|
tensor(int64),
|
42
42
|
tensor(int8),
|
43
43
|
tensor(uint16),
|
44
44
|
tensor(uint32),
|
45
45
|
tensor(uint64),
|
46
46
|
tensor(uint8)
|
47
47
|
):
|
48
48
|
Constrain output types. Casting to strings and complex are not
|
49
49
|
supported.
|