Skip to content

Commit a4a7eb6

Browse files
BruceDaifdwr
andauthored
Restrict scale's values of dequantizeLinear and quantizeLinear to be positive and nonzero (#906)
* Restrict scale of dequantizeLinear and quantizeLinear to be positive * Update description for non-positive scale values * remove the step of checking scale contain non-positive values * Update prose to say values must be nonzero * update descriptions for scale's values being negative * refine descriptions for scale's values being negative * Just normalize wording across two locations --------- Co-authored-by: Dwayne Robinson <dwayner@microsoft.com>
1 parent 32a1770 commit a4a7eb6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

index.bs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4116,7 +4116,7 @@ partial dictionary MLOpSupportLimits {
41164116
<div dfn-for="MLGraphBuilder/dequantizeLinear(input, scale, zeroPoint, options)" dfn-type=argument>
41174117
**Arguments:**
41184118
- <dfn>input</dfn>: an {{MLOperand}}. The input tensor.
4119-
- <dfn>scale</dfn>: an {{MLOperand}}. The scale tensor to multiply each input value by after adjusting by the zero point. It must be [=blockwise broadcastable=] with the input.
4119+
- <dfn>scale</dfn>: an {{MLOperand}}. The scale tensor to multiply each input value by after adjusting by the zero point. It must be [=blockwise broadcastable=] with the input. Values must be positive and nonzero, or else the behavior is [=implementation-defined=] (e.g. correct results, incorrect results, or compilation failure).
41204120
- <dfn>zeroPoint</dfn>: an {{MLOperand}}. The zero point tensor to subtract from each input value. It has the same [=MLOperand/shape=] as the scale.
41214121
- <dfn>options</dfn>: an {{MLOperatorOptions}}. Specifies the optional parameters of the operation.
41224122

@@ -4291,7 +4291,7 @@ partial dictionary MLOpSupportLimits {
42914291
<div dfn-for="MLGraphBuilder/quantizeLinear(input, scale, zeroPoint, options)" dfn-type=argument>
42924292
**Arguments:**
42934293
- <dfn>input</dfn>: an {{MLOperand}}. The input tensor.
4294-
- <dfn>scale</dfn>: an {{MLOperand}}. The scale tensor to divide each input value by before adjusting by the zero point. It must be [=blockwise broadcastable=] with the input.
4294+
- <dfn>scale</dfn>: an {{MLOperand}}. The scale tensor to divide each input value by before adjusting by the zero point. It must be [=blockwise broadcastable=] with the input. Values must be positive and nonzero, or else behaviors are implementation dependent (e.g. correct results, incorrect results, or compilation failure).
42954295
- <dfn>zeroPoint</dfn>: an {{MLOperand}}. The zero point tensor to add to each rescaled input value. It has the same [=MLOperand/shape=] as the scale.
42964296
- <dfn>options</dfn>: an {{MLOperatorOptions}}. Specifies the optional parameters of the operation.
42974297

0 commit comments

Comments
 (0)