aboutsummaryrefslogtreecommitdiff
path: root/src/armnn/test/QuantizerTest.cpp
AgeCommit message (Collapse)Author
2021-02-12IVGCVSW-4893 Refactor ILayerVisitor using unified interface strategy.Finn Williams
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Signed-off-by: Finn Williams <Finn.Williams@arm.com> Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: Id7bc8255a8e3f9e5aac65d510bec8a559bf37246
2021-01-14MLCE-325 ArmnnQuantizer incorrectly Quantizes all DataTypesMike Kelly
* ArmnnQuantizer incorrectly converts boolean or integer DataTypes to quantized DataTypes. This breaks layers like ArgMinMax where the output contains the index of an element along an axis. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I272c3d0f48bf884a2480bfa43eb14ec265fcda6b
2020-06-17IVGCVSW-4909 Add Quantizer Support for FILL operatorKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I7ac9600b8956b4fb875f2f7efa061f8dac73d53c
2020-04-10IVGCVSW-4483 Remove boost::polymorphic_downcastJan Eilers
* exchange boost::polymorphic_downcast with armnn::PolymorphicDowncast * remove unnecessary includes of boost::polymorphic_downcast Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ie603fb82860fe05fee547dc78073230cc62b2e1f
2020-04-06IVGCVSW-4485 Remove Boost assertNarumol Prangnawarat
* Change boost assert to armnn assert * Change include file to armnn assert * Fix ARMNN_ASSERT_MSG issue with multiple conditions * Change BOOST_ASSERT to BOOST_TEST where appropriate * Remove unused include statements Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I5d0fa3a37b7c1c921216de68f0073aa34702c9ff
2020-03-10IVGCVSW-4482 Remove boost::ignore_unusedJan Eilers
!referencetests:229377 Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ia9b360b4a057fe7bbce5b268092627c09a0dba82
2020-03-02IVGCVSW-4440 : Add HARD_SWISH Support to Activation in CpuRefColm Donelan
* Add a new Activiation type of HardSwish. * Add CpuRef support and tests. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I68c3840aa45b7a27d5e416a5d50fe8f99f003ce8
2020-02-28IVGCVSW-4439: Adding Elu support to ActivationDavid Monahan
* Added CpuRef implementation * Added Unit Tests * Added Quantizer Test * Enabled Tests for Neon and CL backends on fp32 only * Added to Serializer Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ic23e1797dbc9352b40678c389d7fe2b836b582ea
2020-02-07IVGCVSW-4386 Add ArmNN reference support for QAsymmS8Ryan OShea
* Added Quantization Scheme for QAsymmS8 * Added Unit Tests for QAsymmS8 * Renamed QAsymm8 calls to QAsymmU8 Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I897b4e018ba1d808cc3f8c113f2be2dbad49c8db
2020-01-23IVGCVSW-4259 Add frontend and reference workload for UnaryOperationLayerjosh minor
* Added new layer named ElementwiseUnary * Deprecated existing Abs/Rsqrt layer functions * Updated existing Abs/Rsqrt test infrastructure to use new layer * Added boilerplate for new Exp,Neg,Sqrt elemwise op layers * AbsQuantize test removed pending future commit * Serialization support added !android-nn-driver:2550 Change-Id: Ic595c645925e17b45db568187fd05646daf2e87f Signed-off-by: josh minor <josh.minor@arm.com>
2020-01-20IVGCVSW-4331 Calling RemoveDebugLayers can break connectionsMike Kelly
* Changed RemoveDebugLayers to move all connections from its OutputSlot. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: I3c649e3f660804ca48f3c2af993a5af6a7ed4d4a
2020-01-13Rename quantized data types to remove ambiguity for signed/unsigned payloadsDerek Lamberti
!android-nn-driver:2572 Change-Id: I8fe52ceb09987b3d05c539409510f535165455cc Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-31IVGCVSW-4246 Clean build of Visitors with -WextraDerek Lamberti
Change-Id: Icb1b35ff55fa22103777853e6f49fc282d61750d Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-09IVGCVSW-4211 Add Signed 8 bit Quantisation support into the Reference backendFinn Williams
!android-nn-driver:2435 Signed-off-by: Finn Williams <Finn.Williams@arm.com> Change-Id: I10ecd4a8937725953396805f33a3562a5384c4d4
2019-10-25IVGCVSW-4018 Move QuantizeHelper.hpp to armnnUtilsAron Virginas-Tar
* Moved QuntizeHelper.hpp to armnnUtils * Reordered parameters for QuantizedVector and added default values for qScale and qOffset to make life easier when using the function for non-quantized types such as Float16 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I28c263dfa425f1316feccb4116839a84f5d568e5
2019-10-23IVGCVSW-4013 Test that the quantizer fails gracefullySadik Armagan
* Added Quantizer test for StandIn Layer Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I48bb9cadb48e20ee8e5b3dcf9e2f9fdb3b68351d
2019-10-22IVGCVSW-3995 Add Quantizer support for ComparisonLayerAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Iab9b234d233591391a8e8626b7e8df3b7b0770a0
2019-10-15IVGCVSW-3976 Add Quantizer support for LOG_SOFTMAXSadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I907f9b585f7ecd079c9cdd3c2edb6c473bf1d215
2019-10-04IVGCVSW-3935 Add Quantizer support for INSTANCE_NORMALIZATIONAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I175008c81da028fb5bdc71e0abff06bc6e58734c
2019-09-23IVGCVSW-3887 Add Quantizer support for DepthToSpaceAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I144c04f920ba3329886367f5e73fe758505ab96e
2019-09-19IVGCVSW-3725 Adding quantization support for ArgMinMaxNikhil Raj
Change-Id: I7582a9ee36b4d1764a5a137cefe9b7b7dfe30254 Signed-off-by: Nikhil Raj <nikhil.raj@arm.com>
2019-09-18IVGCVSW-3881 Add Quantizer support for SLICEAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I72bc00888d416fee177ea2e6e5006f8ff04f612e
2019-09-06IVGCVSW-3742 Add Quantizer support for ABSFinnWilliamsArm
Signed-off-by: FinnWilliamsArm <Finn.Williams@arm.com> Change-Id: I3f8e716ae432737bb314e26792d18aa518aa1952
2019-07-15IVGCVSW-3421 Add Quantizer support for the new Stack layerMatthew Jackson
* Implemented VisitStackLayer * Added unit test for Stack layer quantization Signed-off-by: Matthew Jackson <matthew.jackson@arm.com> Change-Id: I6f708543711c3600fa6c78d6d1f41ef14bbb90bb
2019-07-02IVGCVSW-3382 Deprecate ResizeBilinear and use Resize with Bilinear methodAron Virginas-Tar
!android-nn-driver:1451 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: Ieedbce1f6e95891137a250fdd07e2f7e4e1f4828
2019-07-01IVGCVSW-3366 Add Quantizer support for ResizeLayerTeresa Charlin
Signed-off-by: Teresa Charlin <teresa.charlinreyes@arm.com> Change-Id: Ibfd4725bb04a5859488e968513cf11ac450fd277
2019-06-21IVGCVSW-3322 Add Quantizer support for TransposeConvolution2DLayerexperimental/transpose_conv2dAron Virginas-Tar
Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I26997d7770585055b2b3256baad2800a4c5ed7e8
2019-06-19IVGCVSW-3270 Add Quantizer support for the new Prelu Activation layerMatteo Martincigh
* Implemented VisitPreluLayer * Added unit test for Prelu layer quantization Change-Id: I0442053f69608a400d295654b103cfd2429a0341 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-06-18IVGCVSW-3234 Ensure that Quantizer allows different quantization scalesNarumol Prangnawarat
on inputs and output of Concat layer Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: Idd79e44dbf49345aced3ddeeb8a53c9776f9f5d5
2019-06-12IVGCVSW-3261 Add Quantizer support for SpaceToDepth layerAron Virginas-Tar
Change-Id: Ic08e38fe10ca1abd79c6e4b1a83dc9a929686b56 Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com>
2019-06-07IVGCVSW-3228 Fix bias quantization to be INT32 not QAsymm8Francis Murtagh
* Add function to calculate bias tensor quantization scale from input and weights scales. * Change visitor method of Conv2d, DepthwiseConv and FullyConnected to use the new function. * Fix Unit tests to expect correctly calculated quantization parameters. Change-Id: Ic36f47ceea81243c813d74ccf791e984c819cc71 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-05-28IVGCVSW-3119 Rename MergerLayer to ConcatLayerJim Flynn
!android-nn-driver:1210 Change-Id: I940b3b9e421c92bfd55ae996f7bc54ac077f2604 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-14Use the new deprecation APIMatteo Martincigh
* Used the new ARMNN_DEPRECATED_MSG macro instead of @deprecated * Refactored the code to no longer use the deprecated methods where applicable !android-nn-driver:1126 Change-Id: Ib0578d3d6fc5a763f5fb922f67ba91fafc7796f6 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-05-14IVGCVSW-3076 Add ConcatLayer methods to public APIJim Flynn
!android-nn-driver:1120 Change-Id: I5192fa3deb4ea9766d38ad0bf4dfbfa0b4924c41 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-10IVGCVSW-3061 Modify NetworkQuantizer to support option to preserve ↵Nattapat Chaimanowong
input/output types * Also add unit tests for new preserve type option Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> Change-Id: I860759072f2e3546698118d1bcd5e79eb4e805ec
2019-05-08IVGCVSW-2833 Add Dynamic QuantizationJim Flynn
Change-Id: Iba91e3f3625639f01d66f81a9f3e419e0e285d66 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-05-07IVGCVSW-3067 Fix issue with QuantizerVisior not setting TensorShape correctlyNattapat Chaimanowong
* Also update unit tests for the quantizer to check the input and output shape of the network Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com> Change-Id: Ie804d852f2a4770d98dfb4dab6415f3d0fdd2ce4
2019-03-22IVGCVSW-2859 Add unit tests for QSymm16 quantizationNattapat Chaimanowong
* Add quantization test under QSymm16 scheme for all layers * Refactor existing tests to reduce code duplication Change-Id: I66c9437b3247d78acbb4ebc2c2481f3238268038 Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
2019-03-20IVGCVSW-2858 Add support for QSymm16 quantizationNattapat Chaimanowong
Change-Id: Ia7c305c30c39ec0e9db447a461479be17fde250c Signed-off-by: Nattapat Chaimanowong <nattapat.chaimanowong@arm.com>
2019-02-27IVGCVSW-2632 Fix RefMerger from QAsymm8 types with different quantization ↵Ferran Balaguer
parameters Change-Id: Ie67ce4966c5e5fef618876b027292da429de1485 Signed-off-by: Ferran Balaguer <ferran.balaguer@arm.com>
2019-02-25IVGCVSW-2721 Quantize and Dequantize aren't quite rightFrancis Murtagh
* Add check for infinity and negative infinity in quantize() * Add assert for NaN value in quantize and dequantize() * Add unit tests for infinity and negative infinity Change-Id: Ie60e1e15b289ccbf99df4a3281f067b82cc9f9bf Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-02-21IVGCVSW-2613 Support static quantization of BatchToSpaceFerran Balaguer
Change-Id: I44b12c5c246b7aacc789420dbe55a16efaab6f98
2019-02-18IVGCVSW-2619 Support static quantization of StridedSliceFrancis Murtagh
Change-Id: Iff0902ea2751b079563ce82fbbec6db5157c3392 Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-02-18IVGCVSW-2626 Add Quantization of ResizeBilinear LayerJim Flynn
Change-Id: I0daffd23f32cc094d8309aed822cc46bb2aaa46f Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-02-15IVGCVSW-2618 Support static quantization of SplitterFrancis Murtagh
Change-Id: I8e44866336dcd5a9694309cf9bb954a4991e61fd Signed-off-by: Francis Murtagh <francis.murtagh@arm.com>
2019-02-15IVGCVSW-2616: static quantization of reshapeNina Drozd
Change-Id: Iaefa145b8a218b3708c8a9208fdabd4984376ae9 Signed-off-by: Nina Drozd <nina.drozd@arm.com>
2019-02-15IVGCVSW-2621 Add static quantization of MergerJim Flynn
Change-Id: I19f01698a6f9b361cd1737d76e6ec2020fab77a6 Signed-off-by: Jim Flynn <jim.flynn@arm.com>
2019-02-14IVGCVSW-2620 Support static quantization of ConstantMatteo Martincigh
* Added VisitConstantLayer to QuantizerVisitor * Added unit tests and refactored QuantizerTest.cpp * Code cleanup Change-Id: I118fd2be085fc98879c5cfaa09698a7c98ba13f0 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com>
2019-02-14IVGCVSW-2615 Support static quantization of Pooling2dFrancisMurtagh
Change-Id: Ica9c48adad741840b201047bb65541a19aac17f7 Signed-off-by: FrancisMurtagh <francis.murtagh@arm.com>
2019-02-13IVGCVSW-2617 Add static quantization of SpaceToBatchJim Flynn
* Some refactor of the existing QuantizePermute test for reuse Change-Id: Ifaf1afc476bad348f260fa5340c0153e7ade2703 Signed-off-by: Jim Flynn <jim.flynn@arm.com>