diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-10 01:12:37 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-07-10 01:12:37 +0000 |
commit | 67a6f6dada7020db70c8875f7d9ba3ee1d3a98b1 (patch) | |
tree | e670787d3ce5016bef9198ab79a97a25a0620403 | |
parent | b765123523d93a6d40add0f76fe18bd796eea332 (diff) | |
parent | ba32519aa6f884dc793b56adcdd1415dc4ca5075 (diff) | |
download | ml-android11-d1-s5-release.tar.gz |
Snap for 6667917 from ba32519aa6f884dc793b56adcdd1415dc4ca5075 to rvc-d1-releaseandroid-11.0.0_r9android-11.0.0_r8android-11.0.0_r7android-11.0.0_r15android-11.0.0_r14android-11.0.0_r13android-11.0.0_r12android-11.0.0_r11android-11.0.0_r10android11-d1-s7-releaseandroid11-d1-s6-releaseandroid11-d1-s5-releaseandroid11-d1-s1-releaseandroid11-d1-release
Change-Id: I312d61580ed51886d355308bc6d9f7564895e0d5
-rw-r--r-- | nn/runtime/include/NeuralNetworks.h | 16 | ||||
-rw-r--r-- | nn/tools/api/NeuralNetworks.t | 16 |
2 files changed, 26 insertions, 6 deletions
diff --git a/nn/runtime/include/NeuralNetworks.h b/nn/runtime/include/NeuralNetworks.h index 2f7d3b38e..1eb2f5466 100644 --- a/nn/runtime/include/NeuralNetworks.h +++ b/nn/runtime/include/NeuralNetworks.h @@ -6230,11 +6230,21 @@ typedef struct ANeuralNetworksOperandType { const uint32_t* dimensions; /** - * These two fields are only used for quantized tensors. - * They must be zero for all other types. - * The dequantized value of each entry is (value - zeroPoint) * scale. + * The quantization scale. + * + * Must be 0 when not applicable to an operand type. + * + * See {@link OperandCode}. */ float scale; + + /** + * The quantization zero point. + * + * Must be 0 when not applicable to an operand type. + * + * See {@link OperandCode}. + */ int32_t zeroPoint; } ANeuralNetworksOperandType; diff --git a/nn/tools/api/NeuralNetworks.t b/nn/tools/api/NeuralNetworks.t index a6ab569cd..d7cf8b2d0 100644 --- a/nn/tools/api/NeuralNetworks.t +++ b/nn/tools/api/NeuralNetworks.t @@ -656,11 +656,21 @@ typedef struct ANeuralNetworksOperandType { const uint32_t* dimensions; /** - * These two fields are only used for quantized tensors. - * They must be zero for all other types. - * The dequantized value of each entry is (value - zeroPoint) * scale. + * The quantization scale. + * + * Must be 0 when not applicable to an operand type. + * + * See {@link OperandCode}. */ float scale; + + /** + * The quantization zero point. + * + * Must be 0 when not applicable to an operand type. + * + * See {@link OperandCode}. + */ int32_t zeroPoint; } ANeuralNetworksOperandType; |