Sub - 1 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.

Files changed (1) hide show
  1. Sub1 → Sub13 +34 -12
Sub1 → Sub13 RENAMED
@@ -1 +1 @@
1
- Performs element-wise binary subtraction (with Numpy-style broadcasting support).
1
+ Performs element-wise binary subtraction (with limited broadcast support).
2
+ If necessary the right-hand-side argument will be broadcasted to match the
2
- This operator supports **multidirectional (i.e., Numpy-style) broadcasting**; for more details please check Broadcasting in ONNX <https://github.com/onnx/onnx/blob/master/docs/Broadcasting.md>_.
3
+ shape of left-hand-side argument. When broadcasting is specified, the second
4
+ tensor can either be of element size 1 (including a scalar tensor and any
5
+ tensor with rank equal to or smaller than the first tensor), or having its
6
+ shape as a contiguous subset of the first tensor's shape. The starting of the
7
+ mutually equal shape is specified by the argument "axis", and if it is not set,
8
+ suffix matching is assumed. 1-dim expansion doesn't work yet.
9
+
10
+ For example, the following tensor shapes are supported (with broadcast=1):
11
+
12
+ shape(A) = (2, 3, 4, 5), shape(B) = (,), i.e. B is a scalar tensor
13
+ shape(A) = (2, 3, 4, 5), shape(B) = (1, 1), i.e. B is an 1-element tensor
14
+ shape(A) = (2, 3, 4, 5), shape(B) = (5,)
15
+ shape(A) = (2, 3, 4, 5), shape(B) = (4, 5)
16
+ shape(A) = (2, 3, 4, 5), shape(B) = (3, 4), with axis=1
17
+ shape(A) = (2, 3, 4, 5), shape(B) = (2), with axis=0
18
+
19
+ Attribute broadcast=1 needs to be passed to enable broadcasting.
20
+
21
+ **Attributes**
22
+
23
+ * **axis**:
24
+ If set, defines the broadcast dimensions. See doc for details.
25
+ * **broadcast**:
26
+ Pass 1 to enable broadcasting
27
+ * **consumed_inputs**:
28
+ legacy optimization attribute.
3
29
  **Inputs**
4
30
  * **A** (heterogeneous) - **T**:
5
- First operand.
31
+ First operand, should share the type with the second operand.
6
32
  * **B** (heterogeneous) - **T**:
7
- Second operand.
33
+ Second operand. With broadcasting can be of smaller size than A. If
34
+ broadcasting is disabled it should be of the same size.
8
35
  **Outputs**
9
36
  * **C** (heterogeneous) - **T**:
10
- Result, has same element type as two inputs
37
+ Result, has same dimensions and type as A
11
38
  **Type Constraints**
12
39
  * **T** in (
13
- tensor(bfloat16),
14
40
  tensor(double),
15
41
  tensor(float),
16
- tensor(float16),
42
+ tensor(float16)
17
- tensor(int32),
18
- tensor(int64),
19
- tensor(uint32),
20
- tensor(uint64)
21
43
  ):
22
- Constrain input and output types to high-precision numeric tensors.? ^^^^^^^^^^^^ ^^^^^^^^^
44
+ Constrain input and output types to float tensors.? ^^ ^^