I want to deploy a quantized Tensorflow lite model (inception v4) on Zedboard using ARM compute library, but I don't know how to do it !!
Any help please??
Have you got an Android OS (AOSP) on your Zedboard?
Arm Compute Library (ACL) is a collection of low-level machine learning functions optimized for Arm architectures, but it's not designed for direct use by TensorFlow / TF Lite. For that you're likely to want ArmNN, rather than writing a lot of code yourself.
ArmNN uses ACL, and to deploy your model on that, there's a great tutorial here: https://developer.arm.com/solutions/machine-learning-on-arm/developer-material/how-to-guides/deploying-a-quantized-tensorflow-lite-mobilenet-v1-model-using-the-arm-nn-sdk/single-page
To build ArmNN on Android, there are instructions: https://github.com/ARM-software/armnn/blob/branches/armnn_21_02/BuildGuideAndroidNDK.md
Hope that helps!
Actually, due to the limited memory on Zedboard I was not able to build ARM NN and I choose the cross compilation of ARM NN on it. Now I want to implement a quantized model but I could'nt find any way for that
If you're just wanting to use ACL you'd need to write the model parsing code yourself. ACL provides all the functions once you're running, but ArmNN's designed to do all the setup.
I tried to use ArmNN as you said and when testing ArmNN quantized Mobilenet in the step of building the mobilenetv1_quant_tflite program I get this error
arm-linux-gnueabihf-g++: error: -E or -x required when input is from standard inputarm-linux-gnueabihf-g++: error: -E or -x required when input is from standard inputMakefile:14: recipe for target 'mobilenetv1_quant_tflite' failedmake: *** [mobilenetv1_quant_tflite] Error 1
Any suggestions please??
That looks like a bug in your command line. That's a standard gcc / clang error, likely an incorrect flag, or misplaced '-'
This is the makefile. Actually I checked and I couldn't find the incorrect flag
ARMNN_ROOT = /home/lsa/armnn-pi/armnnARMNN_BUILD = /home/lsa/armnn-pi/armnn/buildBOOST_ROOT = /home/lsa/armnn-pi/boostCXX= arm-linux-gnueabihf-g++CPPFLAGS=-DARMNN_TF_LITE_PARSER -I$(ARMNN_ROOT)/include -I$(ARMNN_ROOT)/src/backends -I$(ARMNN_ROOT)/src/armnnUtils -I$(ARMNN_ROOT)/tests -I$(BOOST_ROOT)/includeCFLAGS=-Wall -O3 -std=c++14 -fPIE
LDFLAGS=-pie -L$(ARMNN_BUILD) -L$(ARMNN_BUILD)/tests -L$(BOOST_ROOT)/libLDLIBS=-larmnn -larmnnTfLiteParser -lboost_system -lboost_filesystem -lboost_program_options
mobilenetv1_quant_tflite: mobilenetv1_quant_tflite.cpp inference_test_image.cpp utils.cpp $(CXX) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS)
clean: -rm -f mobilenetv1_quant_tflite
It's likely to be the command line rather than the Makefile. What have you got there?
I just wrote make
Ah, so it's not that then! :)
I also can't see what's weird in the makefile, but others are more expert at make than me, so someone else might pick up something that's missing or whatever.
Ok thank you for your Help !
View all questions in Machine Learning forum