Différences entre les versions de « Deep Learning Tutorial 2019 installations »
m |
m |
||
Ligne 139 : | Ligne 139 : | ||
<i> Check that your tutorial organisation is in this hierarchical order:</i> | <i> Check that your tutorial organisation is in this hierarchical order:</i> | ||
− | ├── 01_introduction_to_dl_concepts | + | ├── 01_introduction_to_dl_concepts<br> |
− | │ └── README.md | + | │ └── README.md<br> |
− | ├── 02_a_primer_on_python | + | ├── 02_a_primer_on_python<br> |
− | │ └── README.md | + | │ └── README.md<br> |
− | ├── 03_introduction_to_pytorch | + | ├── 03_introduction_to_pytorch<br> |
− | │ ├── p01_pytorch-tensors.ipynb => Introduction to PyTorch tensors + autograd. | + | │ ├── p01_pytorch-tensors.ipynb => Introduction to PyTorch tensors + autograd.<br> |
− | │ ├── p02_pytorch_dataloaders.ipynb => Introduction to PyTorch dataloaders. | + | │ ├── p02_pytorch_dataloaders.ipynb => Introduction to PyTorch dataloaders.<br> |
− | │ ├── p03_pytorch_model_training.ipynb => Training a state-of-the-art model in PyTorch. | + | │ ├── p03_pytorch_model_training.ipynb => Training a state-of-the-art model in PyTorch.<br> |
− | │ ├── p05_extra_pytorch_mnist_training.ipynb => A bonus program to train a a simple CNN on the mnist dataset. | + | │ ├── p05_extra_pytorch_mnist_training.ipynb => A bonus program to train a a simple CNN on the mnist dataset. <br> |
− | │ ├── p05_extra_pytorch_mnist_inference_live.py => Bonus program to use the model trained above for live inference on the webcam stream. | + | │ ├── p05_extra_pytorch_mnist_inference_live.py => Bonus program to use the model trained above for live inference on the webcam stream.<br> |
− | │ └── utils | + | │ └── utils<br> |
− | │ ├── hicoDataset.py => Custom data-loader class for hico-Det dataset | + | │ ├── hicoDataset.py => Custom data-loader class for hico-Det dataset<br> |
− | ├── 04_introduction_to_tensorflow | + | ├── 04_introduction_to_tensorflow<br> |
− | │ └── README.md | + | │ └── README.md<br> |
− | ├── 05_a_dl_application | + | ├── 05_a_dl_application<br> |
− | │ └── README.md | + | │ └── README.md<br> |
− | ├── 06_generating_images_with_gans | + | ├── 06_generating_images_with_gans<br> |
− | │ └── README.md | + | │ └── README.md<br> |
− | ├── 07_presentation_of_unistra_hpc | + | ├── 07_presentation_of_unistra_hpc<br> |
│ └── README.md | │ └── README.md | ||
Version du 6 septembre 2019 à 12:31
Instructions
Participants MUST complete the 3 following instructions before the tutorial kick off date:
- Installations
- Download resources
- Configurations
Installations
There are 2 options:
- Using personal computer
- Using Google Colab (alternative)
Using personal computer
A. Download and install Anaconda
Follow the underlisted steps to install Anaconda distribution in Linux (Ubuntu):
- cd /tmp
- curl -O https://repo.anaconda.com/archive/Anaconda3-2019.03-Linux-x86_64.sh
- sha256sum Anaconda3-2019.03-Linux-x86_64.sh
- bash Anaconda3-2019.03-Linux-x86_64.sh
- source ~/.bashrc
- conda list
Follow the underlisted steps to install Anaconda distribution in Windows:
- coming soon ...
B. Create virtual environment
We will use the name `dsai` for thi purpose (if you choose a different name, endeavour to be consistent):
- conda create --name dsai
- source activate dsai
C. Install packages
Install PyTorch and Tensorflow packages. Depending on your system, you can install either the cpu or gpu version. Do not install both:
- conda install pytorch torchvision cpuonly -c pytorch # for cpu
- conda install -c aaronzs tensorflow=1.10
Or;
- conda install pytorch torchvision cudatoolkit=9.2 -c pytorch # for gpu with cuda 9.2
- conda install -c aaronzs tensorflow-gpu=1.10
Install python libraries:
- conda install numpy matplotlib
- pip install torchsummary
- conda install -c anaconda scipy==1.1.0
- conda install -c conda-forge opencv tqdm
- conda install -c anaconda opencv3
- conda install -c anaconda matplotlib
- conda install -c anaconda pillow
- conda install -c anaconda scikit-learn
- conda install -c anaconda scikit-image
For editor, install either jupyter notebook or jupyter lab:
- conda install -c anaconda jupyter
Or;
- conda install -c conda-forge jupyterlab
You may need to have other editors like notebook, sublime text, vscode, spyder, etc., if you wish.
Using Google Colab (alternative)
Navigate to the dataset directory and run the download.sh bash file::
- Login to your google account; open google drive
- Download this folder: (link will be provided soon)
- unzip the folder and upload to your google drive
- Go to your google drive > dsai_tutorial_2019
- open setup_mount.ipynb; run first and second cell to mount the drive and to create a symlink
- open respective notebooks instructed by the instructors
Downloads
There are 3 resources to download:
- Codes
- Models
- Dataset
A. Codes
clone the git repository::
- git clone https://icube-forge.unistra.fr/CAMMA/misc/dsai_dl_tutorial.git
- cd dsai_dl_tutorial
B. Models
Navigate to the model directory and run the download.sh bash file::
- cd models
- chmod +x download.sh
- ./download.sh
B. Dataset
Navigate to the dataset directory and run the download.sh bash file::
- cd ../dataset
- chmod +x download.sh
- ./download.sh
Configurations
Ensure every installation is completed successfully and every resources downloaded to their appropriate directory:: Execute check_packages.sh to see any missing package:
- cd ..
- chmod +x check_packages.sh
- ./check_packages.sh
See the output of the bash file to install missing packages.
Run either jupyter notebook or jupyter lab to view/run the tutorial notebooks
- jupyter notebook
Or,
- jupyter lab
If you completed up to this step, you are ready!
Check that your tutorial organisation is in this hierarchical order:
├── 01_introduction_to_dl_concepts
│ └── README.md
├── 02_a_primer_on_python
│ └── README.md
├── 03_introduction_to_pytorch
│ ├── p01_pytorch-tensors.ipynb => Introduction to PyTorch tensors + autograd.
│ ├── p02_pytorch_dataloaders.ipynb => Introduction to PyTorch dataloaders.
│ ├── p03_pytorch_model_training.ipynb => Training a state-of-the-art model in PyTorch.
│ ├── p05_extra_pytorch_mnist_training.ipynb => A bonus program to train a a simple CNN on the mnist dataset.
│ ├── p05_extra_pytorch_mnist_inference_live.py => Bonus program to use the model trained above for live inference on the webcam stream.
│ └── utils
│ ├── hicoDataset.py => Custom data-loader class for hico-Det dataset
├── 04_introduction_to_tensorflow
│ └── README.md
├── 05_a_dl_application
│ └── README.md
├── 06_generating_images_with_gans
│ └── README.md
├── 07_presentation_of_unistra_hpc
│ └── README.md
- Reference materials
Follow the following steps to install
Follow the following steps to install
- Survey
- Exercises