Deep Learning

From
Revision as of 13:45, 17 December 2019 by Admin (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Contents

[edit] Install tensorflow on Nvidia Jetson Nano

[edit] 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

[edit] Configure Jetson Nano

[edit] 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

[edit] Lock Jetson Nano at its maximum frequency and power mode

sudo jetson_clocks
sudo nvpmodel -m 0


[edit] 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

[edit] 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

[edit] Install PIP to manage Python modules

cd ~
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
rm get-pip.py

[edit] 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

[edit] Activate the Virtual Environment

source <chosen_venv_name>/bin/activate
source DL_lab2/bin/activate

[edit] 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

[edit] Deactivate the Virtual Environment

deactivate
# jupyter notebook Documents/TensorFlowLAb/notebooks/

[edit] Exercices from the book

https://github.com/fchollet/deep-learning-with-python-notebooks

Personal tools
MediaWiki Appliance - Powered by TurnKey Linux