aboutsummaryrefslogtreecommitdiff
path: root/src/armnnTfLiteParser
AgeCommit message (Collapse)Author
2020-07-28IVGCVSW-4932 Introduce ShapeInferenceMethod to TfLite ParserSadik Armagan
* Introduced ShapeInferenceMethod::InferAndValidate to TfLiteParser * Added unit tests Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: Iad4aadce92912e7645b1652019ec4af478b7fc32
2020-07-28Github#433 Add HardSwish support to TfLiteParserJan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Ic476f8d80bba080ab459db9e6a59cbafd307d129
2020-07-14IVGCVSW-4847, Github #393 Fix TfLite reshape operatorJan Eilers
* Change order of reading target shape. Checks built-in option first then input. Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: Iddc39188ebfb7f71e33c35847de7506a02d807af
2020-07-10Github #388 Remove TfLite Concat quant validationJames Conroy
* Matching quant validation was added to TfLite parser as per TfLite documentation. * Removing this validation for Concat and Pad as it is causing some nightly model test failures. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: Ie128fb66cc2d4a193ac22dc9eb41f5703d113663
2020-07-08GitHub #388 Add matching quant checks in TfLite parserJames Conroy
* Adds checks for matching tensor quantization info as per TfLite documentation. * Adds missing layer nullptr assert checks. Signed-off-by: James Conroy <james.conroy@arm.com> Change-Id: I4344a3554e349ce8edcd14126f63bc627637e0cd
2020-07-06GitHub #418 AddBroadcastReshapeLayer can cause inputs to be connected ↵Mike Kelly
incorrectly * Fixed issue where AddBroadcastReshapeLayer would always connect the Reshaped input to the first input slot and the other input to the first input slot. Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: Ifd2745a819eb0f72ff9433690afc92a6a34f2ec3
2020-07-06IVGCVSW-4988 Add handling output shape parameter to TransposeConvolution2dColm Donelan
* Add m_OutputShape and m_OutputShapeEnabled to TransposeConvolution2dDescriptor. * Update TfLite parser to populate m_OutputShape if found in the model. Handle both Signed32 from tflite files and QAsymmU8 from test fixtures. * Update TransposeConvolution2dLayer to use m_OutputShape instead of InferOutputShapes if specified. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ia6933065375eb8006c916f1ca67c38dc50bc205c
2020-06-30IVGCVSW-4487 Remove boost::filesystemFrancis Murtagh
* Replace filesystem::path * Replace filesystem::exists * Replace filesystem::is_directory * Replace filesystem::directory_iterator * Replace filesystem::filesystem_error exception * Replace filesystem::temp_directory_path * Replace filesystem::unique path * Replace filesystem::ofstream with std::ofstream * Replace filesystem::remove * Replace filesystem::is_regular_file * Replace boost::optional with armnn::Optional in touched files * Remove some superfluous includes * Update build guides, GlobalConfig.cmake and CMakeLists.txt * Remove redundant armnnUtils::Filesystem::Remove function. * Remove redundant armnnUtils::Filesystem::GetFileSize function. Temporarily adding back Boost::filesystem to enable Boost::dll. Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: Ifa46d4a0097d2612ddacd8e9736c0b36e365fb11
2020-06-29IVGCVSW-5021 Fix failure in SplitVJan Eilers
Signed-off-by: Jan Eilers <jan.eilers@arm.com> Change-Id: I587f601d3e1b9ea11fbc3dc379f24c5ebdcf3cf8
2020-06-09IVGCVSW-4968 Fix exception handling in TfLiteParser.Colm Donelan
* The function TfLiteParser::CreateNetworkFromModel was continuing to parse the input file even after a fatal exception was encountered. restructure catch exceptions outside the for loop. * Add simple unit tests to test some exception handling. Signed-off-by: Colm Donelan <Colm.Donelan@arm.com> Change-Id: I202ca6819d40a47159b4ac8f2847958f945666c2
2020-06-02IVGCVSW-4190 Add SplitV to Tflite ParserRyan OShea
* Refactored SplitV * Added unit tests * Updated Documentation Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: If1dfa5a8780ddf3fe8788ed7bf7fa5fa8dfd14ec
2020-06-02Fix a few build warnings:Rob Hughes
* Remove redundant asserts for unsigned ints being positive * Remove unneeded include of lightweight_test.hpp header * Remove unused exception variable names * Replace hardcoded 0.0f with T() for some template functions * Add a few static_casts Change-Id: I290b0433cf995f6d0199422eaa10f816e5fd8eb9 Signed-off-by: Robert Hughes <robert.hughes@arm.com>
2020-05-30IVGCVSW-4888 Update Resize Front end for new parametersDavid Monahan
* Added AlignCorners and HalfPixelCenters to Resize and ResizeBilinear * Updated Serializer and Serializer tests !android-nn-driver:3280 Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Ice3bb448c239b04323854641525bfe0808c03b2e
2020-05-27Add NEG support to TFLite parserDarshan Patel
* Added unit tests * Updated Documentation Signed-off-by: Darshan Patel <darsh.jp@gmail.com> Change-Id: Id22ffebe60732a93798f72801eb8a2a23cdd7ec0
2020-05-27IVGCVSW-4187 Add LEAKY_RELU to TFLite parserSadik Armagan
Signed-off-by: Nikhil Raj <nikhil.raj@arm.com> Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I3e934142487b92897eb487099a22d032f80e8e07
2020-05-25Add DIV support to TFLite parserDarshan Patel
* Added unit tests * Updated Documentation Signed-off-by: Darshan Patel <darsh.jp@gmail.com> Change-Id: Iadb5c76139d74d755d7f4be4b023b4417efe1e92
2020-05-25IVGCVSW-4792 Update armnn readme and support filesNarumol Prangnawarat
* Add TPIP used by Arm NN * Add SqueezeNet to CaffeSupport.md * Add ResNet v2 50 to TensorFlowSupport.md * Update tested networks in TensorFlowLiteSupported.md Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I15927ea600a3dfffee082933d32f235f3940730e
2020-05-25IVGCVSW-4186 Add EXP unit tests for TfLiteParserRyan OShea
* Updated Documentation * Created unit test file Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: Ic8384b5ed21ac53f918860be8a98c0ac7477d0e1
2020-05-22IVGCVSW-4792 Update armnn readme and support filesNarumol Prangnawarat
* Add Transpose to SerializerSupport.md * Remove ResizeBilinear as it is deprecated layer * Add EXP and SPLIT_V to TensorFlowLiteSupport.md * Add transpose to TensorFlowSupport.md Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com> Change-Id: I05b0411b61c1b74b27b4669e81fa8ce521bb4190
2020-04-29IVGCVSW-4186 Parse TfLite Exp and Split_V operatorsDerek Lamberti
Change-Id: I0cac7ebfe22f2782af3198e6231cb37fa51bbd62 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
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-17IVGCVSW-4545 Relax check on ParseReshapeDerek Lamberti
Change-Id: Icae7c40abb307e1bbdd383ab3f835f5a1bee2db1 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2020-03-12IVGCVSW-4545 Fix segfault parsing reshape layerDerek Lamberti
Change-Id: Ib4bbab387cec4780c8aae56fdede090fa265e4ba Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
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-04IVGCVSW-4213 Enable split along any dimensionRyan OShea
* Remove check on split dimension Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I03b88b8c8f1dcd842d9cc9d783ad7d0aa2c0ed3a
2020-03-03IVGCVSW-4375 Add parser support for TransposeMike Kelly
* Changed TfParser::ParseTranspose to use Transpose instead of Permute * Changed TfLiteParser::ParseTranspose to use Transpose instead of Permute !armnn:2787 Signed-off-by: Mike Kelly <mike.kelly@arm.com> Change-Id: If48f2fb88d97d31d66b6b1e631b41637d8e4c8f0
2020-02-20IVGCVSW-4432 Update Readme for 20.02Sadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I416b39b0adac1410f854d3ec5b855044bd85e1cc
2020-02-19IVGCVSW-4472 Yolo v3 ExecuteNetwork failingKeith Davis
* Add Debug workload for QAsymmS8/U8 * Change Dequantize tests to test AsymmS8 instead of SymmS8 * Fix incorrect supportedness within RefLayerSupport Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: Ie51f1e33c564d46c86bf0150b1addda3fc093d13
2020-02-18COMPMID-3059: Add TF parser support for StridedSliceGeorgios Pinitas
Signed-off-by: Georgios Pinitas <georgios.pinitas@arm.com> Change-Id: I31f25f26a50c9054b5650b1be127c84194b56be7
2020-02-17IVGCVSW-4436 Add ExecuteNetwork test for mobilenet_v2_int8Keith Davis
* Add QAsymmS8 to QueueDescriptor supportedTypes * Add QSymmS8/QAsymmS8 to RefLayerSupport supportedTypes * Some additional comments and refactoring Change-Id: I8567314452e6e8f6f69cb6e458ee147d3fc92fab Signed-off-by: Keith Davis <keith.davis@arm.com>
2020-02-10IVGCVSW-4409 Fix TfLiteParser to handle all datatypes correctlyRyan OShea
* Added check for QAsymmS8 datatype for Per-Tensor quantization Signed-off-by: Ryan OShea <Ryan.OShea2@arm.com> Change-Id: I902aa3863dd5cefdce90e68be8a5750dd6ff9e54
2020-02-07MLCE-139: add capability to align corners for bilinear resizeSang-Hoon Park
* Add parsing of the related parameter to TfLiteParser * Update ResizeDescriptor to store the additional parameter * Update NEON/CL workload to pass the additional parameter. * Update Reference workload to pass and handle the additional parameter. !ComputeLibrary:2538 !ComputeLibrary:2569 !armnn:2612 Signed-off-by: Sang-Hoon Park <sang-hoon.park@arm.com> Change-Id: Id149e1c24c2abed7e9dd81939acf54dfabfcdfd2
2020-01-28IVGCVSW-4335 Add support for per-channel QSymm8 to TfLite parserKeith Davis
Signed-off-by: Keith Davis <keith.davis@arm.com> Change-Id: I52f777f56138a27655a821aff376ecd0d3d23511
2020-01-20Remove use of ArmNN.hpp where it is unnecessary.Matthew Bentham
Signed-off-by: Matthew Bentham <Matthew.Bentham@arm.com> Change-Id: I6c90eab1c6bad76d5c7b3bf094998fa4b454bcd1
2020-01-15Support different flatbuffer libs for debug and releaseRob Hughes
The existing FLATBUFFERS_LIBRARY variable is still honoured, but if not specified then we use CMake's find_library to find the debug and release variants, using PATH_SUFFIXES to help separate debug and release. This is the same approach we use for the armcompute libs. Change-Id: I21e8da3f76669dbfb8dbdf49046f9db46cba50a2 Signed-off-by: Robert Hughes <robert.hughes@arm.com>
2020-01-15IVGCVSW-4193 Add QUANTIZE to the TfLite parserSadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I53431c70edb64c9283ae556407cc07e54469d8cc
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>
2020-01-03IVGCVSW-4246 Clean build of parsers with -WextraDerek Lamberti
Change-Id: Ib00f185b431ab74fd9425d8f478bd2ddb182f74b Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-31Replace Schema.s with generated .cpp fileRob Hughes
This removes the dependency on an assembler (which must support .incbin). Instead we use xxd as a custom build command to generate a .cpp file which is included in the build. This makes it possible to build on Windows, for which you need cp.exe (from GNU Core Utils) and xxd.exe (from Vim). Change-Id: I3a929640b1fdbfc27e2c38abd05bf3a298245ba5 Signed-off-by: Robert Hughes <robert.hughes@arm.com>
2019-12-31Some build fixes for MSVCRob Hughes
Change-Id: I749430918b1268786690c3c8dc9fa2a9542d5d1d Signed-off-by: Robert Hughes <robert.hughes@arm.com>
2019-12-10IVGCVSW-4191 Add DEQUANTIZE to the TfLite ParserFinn Williams
!armnn:2421 Change-Id: Icdb02b7248ed408c3c8ad2e3e38df5b7cda1c545 Signed-off-by: Finn Williams <Finn.Williams@arm.com>
2019-12-05Replace boost logging with simple loggerDerek Lamberti
!referencetests:214319 * Reduces arm nn binary size ~15% * Also fixed test logging black hole issues Change-Id: Iba27db304d9a8088fa46aeb0b52225d93bb56bc8 Signed-off-by: Derek Lamberti <derek.lamberti@arm.com>
2019-12-05IVGCVSW-4179 Add RESIZE_NEAREST_NEIGHBOUR to the TfLite parserSadik Armagan
Signed-off-by: Sadik Armagan <sadik.armagan@arm.com> Change-Id: I6359a8a405c86aef04cde75404393dd4ee917fa5
2019-11-29IVGCVSW-4209 Create a public API for the ArmNN UtilsMatteo Martincigh
* Moved the relevant armnnUtils headers to the new location: include/armnnUtils * Update the header usage throughout the source code !android-nn-driver:2387 Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I2ba15cebcacafad2b5a1a7b9c3312ffc585e09d6
2019-11-19IVGCVSW-1530 Add TfLite slice parser and fix transpose perm vector creationjosh minor
* TfLite slice parser and relevant tests added * TfLite transpose parser logic added to translate Tf/np permutation vector definitions to Armnn definitions * TfLite transpose parser no permute data test modified to include data for default permutation vector when none specified Signed-off-by: josh minor <josh.minor@arm.com> Change-Id: Iebd30971bd180593dc6b8f0d5be1d1bc61a3a5bf
2019-10-31GitHub #292 Move BackendRegistry.hpp to the public APIMatteo Martincigh
* Moved to BackendRegistry.hpp include/armnn * Updated makefiles and sources accordingly Signed-off-by: Matteo Martincigh <matteo.martincigh@arm.com> Change-Id: I4d83abb581d523218a880c879fcf30c9611f7fd7
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-24IVGCVSW-4007 Add StandInLayer for unsupported operations in TfLiteParserAron Virginas-Tar
* Fixed bug in custom operator support that caused all custom operators to be parsed as a DetectionPostProcessLayer * Added support for handling unsupported operators (built-in or custom) by replacing them with a StandInLayer in the generated network * Added options to TfLiteParser to control whether we want to use StandInLayers when we encounter unsupported operators, or we prefer to throw a ParserException as until now Signed-off-by: Aron Virginas-Tar <Aron.Virginas-Tar@arm.com> Change-Id: I125a63016c7c510b1fdde6033842db4f276718c4
2019-10-22IVGCVSW-3669 Fix TfLiteParser to set Splitter layer outputs' quantization paramsFrancis Murtagh
Signed-off-by: Francis Murtagh <francis.murtagh@arm.com> Change-Id: I6c69f1f2f0f9c49ddada57b41d5802919ea14b25