Sub - 6 vs 7#

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. Sub6 → Sub7 +30 -5
Sub6 → Sub7 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
3
27
  **Inputs**
4
28
  * **A** (heterogeneous) - **T**:
5
- First operand.
29
+ First operand, should share the type with the second operand.
6
30
  * **B** (heterogeneous) - **T**:
7
- Second operand.
31
+ Second operand. With broadcasting can be of smaller size than A. If
32
+ broadcasting is disabled it should be of the same size.
8
33
  **Outputs**
9
34
  * **C** (heterogeneous) - **T**:
10
- Result, has same element type as two inputs
35
+ Result, has same dimensions and type as A
11
36
  **Type Constraints**
12
37
  * **T** in (
13
38
  tensor(double),
14
39
  tensor(float),
15
40
  tensor(float16),
16
41
  tensor(int32),
17
42
  tensor(int64),
18
43
  tensor(uint32),
19
44
  tensor(uint64)
20
45
  ):
21
46
  Constrain input and output types to high-precision numeric tensors.