How to set environment variables on Raspberry PI for deployment of TFLite on Pi?
Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you!Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you! Hi!
I am trying to follow some examples for deploying trained Tensorflow Lite models from MATLAB to Raspberry Pi. Here are the pre-requisites I am trying to satisfiy:
https://www.mathworks.com/help/deeplearning/ug/prerequisites-for-deep-learning-with-tensorflow-lite-models.html
At the end of this page, there are some instructions on setting some environment variables. I could do as instructed on the host computer, but I am confused how to set the variables on Raspberry Pi. Specifically, I couldn’t find the correct paths for TFLITE_PATH and LD_LIBRARY_PATH. According to the instructions, I should set
TFLITE_PATH: Location of the TensorFlow Lite library directory.
LD_LIBRARY_PATH: Location of the run-time shared library. For example, TFLITE_PATH/lib/tensorflow/lite.
Here is how I installed TFLite on my Raspberry Pi. I used the command "python3 -m pip install tflite-runtime", which seemed to successfully install TFLite. This can be verified when I excuted the following commands on the Pi terminal:
python3
import tflite_runtime
tflite_runtime.__version__
which then shows ‘2.5.0’.
When I executed "python3 -m pip show tflite_runtime", this is what I see:
Name: tflite-runtime
Version: 2.5.0
Summary: TensorFlow Lite is for mobile and embedded devices.
Home-page: https://www.tensorflow.org/lite/
Author: Google, LLC
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /home/pi/.local/lib/python3.7/site-packages
Requires: numpy
Required-by:
I’m not sure if that "site-packages" folder is the correct location for the library. If I set this to be my TFLITE_PATH, there is no such sub-directory as "TFLITE_PATH/lib/tensorflow/lite" which is supposed to be defined as LD_LIBRARY_PATH.
Please let me know if I am missing anything. Thank you! raspberry pi, tensorflow lite, deployment MATLAB Answers — New Questions