Deep Learning
From
Install tensorflow on Nvidia Jetson Nano
Jetson nano setup
https://thenewstack.io/tutorial-configure-nvidia-jetson-nano-as-an-ai-testbed/
https://devtalk.nvidia.com/default/topic/1048776/official-tensorflow-for-jetson-nano-/?offset=72
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html
https://www.dlology.com/blog/how-to-run-keras-model-on-jetson-nano/
https://github.com/mohitkumarahuja/Install-TensorFlow-and-Keras-on-Jetson-TX2-with-JetPack-3.1
This installation works:
https://maduinos.blogspot.com/2019/08/jetson-nano-tutorialtensorflow-keras.html
Configure Jetson Nano
Run the below script to add a 2GB swap file
sudo fallocate -l 2G /swapfile sudo chmod 600 /swapfile sudo mkswap /swapfile sudo swapon /swapfile sudo swapon --show sudo cp /etc/fstab /etc/fstab.bak echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
Lock Jetson Nano at its maximum frequency and power mode
sudo jetson_clocks sudo nvpmodel -m 0
Install Deep Learning Frameworks and Libraries
sudo apt install -y git \ cmake \ libatlas-base-dev \ gfortran \ python3-dev \ python3-pip \ libhdf5-serial-dev \ hdf5-tools
point the default Python executable to Python3
echo "export PATH=$PATH:/$HOME/.local/bin" >> .bashrc echo "alias python=python3" >> .bashrc echo "alias pip=pip3" >> .bashrc source .bashrc
Install PIP to manage Python modules
cd ~ wget https://bootstrap.pypa.io/get-pip.py sudo python get-pip.py rm get-pip.py
Set up the Virtual Environment
sudo apt-get install virtualenv python3 -m virtualenv -p python3 <chosen_venv_name> python3 -m virtualenv -p python3 DL_lab2
Activate the Virtual Environment
source <chosen_venv_name>/bin/activate source DL_lab2/bin/activate
Install TensorFlow and its dependencies
pip install -U pip setuptools --user pip install --user numpy pip install --user --extra-index-url https://developer.download.nvidia.com/compute/redist/jp/v42 tensorflow-gpu==1.13.1+nv19.3 pip install --user keras pip install --user jupyter pip install --user pillow pip install --user matplotlib
Deactivate the Virtual Environment
deactivate
# jupyter notebook Documents/TensorFlowLAb/notebooks/
Exercices from the book
https://github.com/fchollet/deep-learning-with-python-notebooks