This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### How to download and setup Pytorch, CUDA 9.0, cuDNN 7.0, Anaconda2 with or without sudo rights | |
# Tested on Ubuntu 16.04, GPU support, pytorch 0.4.1, cuda 9.0, cuDNN 7.0, Anaconda2 version 5.2.0. If you want other versions small changes must be made. | |
# Note: you can install everything with or without sudo rights ( if you do not have sudo rights we will install everything locally ) | |
### Download and install CUDA 9.0 Toolkit | |
# Note: NVIDIA drivers can be also installed during the process (if you have the rights) | |
# Check that the version of your NVIDIA drivers is compatible with CUDA 9.0. If not you should install the drivers or change CUDA version. | |
# The default installation path is "/usr/local/cuda". You can install here ONLY if you have the rights to do that, otherwise you must install them somewhere else. You can create a folder where you want and then you MUST say to the installation process the path to the folder you created. Example: I create a folder in ~/nvidia_libraries/cuda-9.0/ so when the proce |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Example TensorFlow script for finetuning a VGG model on your own data. | |
Uses tf.contrib.data module which is in release v1.2 | |
Based on PyTorch example from Justin Johnson | |
(https://gist.github.com/jcjohnson/6e41e8512c17eae5da50aebef3378a4c) | |
Required packages: tensorflow (v1.2) | |
Download the weights trained on ImageNet for VGG: | |
``` | |
wget http://download.tensorflow.org/models/vgg_16_2016_08_28.tar.gz |