Installation grundlegender Pakete
1 2 3 |
sudo apt-get install git sudo apt-get install cmake sudo apt-get install build-essential |
Installation der Programmiersprache Lua
1 |
sudo apt-get install lua5.2 |
Installation von LuaRocks (Paketmanager für Lua-Module)
1 |
sudo apt-get install luarocks |
Installation von LuaJIT (Just-In-Time Compiler für Lua)
1 |
sudo apt-get install luajit |
Installation von Torch
(Software-Framework für wissenschaftliche Berechnungen und maschinelles Lernen. Die Script-Sprache basiert auf Lua)
1 2 |
sudo apt-get install curl curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-all | bash |
Alternative Installation von Lua und Torch
1 2 3 4 5 |
cd ~/ curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash git clone https://github.com/torch/distro.git ~/torch --recursive cd ~/torch; ./install.sh source ~/.bashrc |
Start von Torch und Überprüfung der Installation
1 |
luajit –ltorch |
Die Torch-Shell wird mit exit wieder geschlossen.
Installation von loadcaffe
(Paket für neuronale Netzwerke)
1 2 |
sudo apt-get install libprotobuf-dev protobuf-compiler sudo luarocks install loadcaffe |
Aktualisierung der Pakete
1 2 |
sudo luarocks install image sudo luarocks install nn |
Neues Verzeichnis anlegen mit
1 |
mkdir mydirectory |
Ins Verzeichnis wechseln mit
1 |
cd mydirectory |
Installation von neural-style
1 |
sudo git clone https://github.com/jcjohnson/neural-style.git |
Ins Verzeichnis neural-style wechseln und Modelle herunterladen
1 2 |
cd neural-style sudo sh models/download_models.sh |
Installation der CUDA-Treiber
1 2 3 4 |
wget http://developer.download.nvidia.com/compute/cuda/7_0/Prod/local_installers/rpmdeb/cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb sudo dpkg -i cuda-repo-ubuntu1404-7-0-local_7.0-28_amd64.deb sudo apt-get update sudo apt-get install cuda |
Anschließend muss das System neu gebootet werden
Installation des CUDA-Backends für Torch
1 2 3 4 |
cd ~/ cd neural-style sudo luarocks install cutorch sudo luarocks install cunn |
cuDNN-Implementierung
Damit cuDNN heruntergeladen werden kann, muss man sich beim Entwicklerportal von Nvidia registrieren: https://developer.nvidia.com/cudnn
Im nächsten Schritt wird das Paket entpackt, kopiert und installiert
1 2 3 4 |
tar -xzvf cudnn-7.0-linux-x64-v4.0-prod.tgz sudo cp cuda/lib64/libcudnn* /usr/local/cuda-7.0/lib64/ sudo cp cuda/include/cudnn.h /usr/local/cuda-7.0/include/ sudo luarocks install cudnn |
Installation von neural-style
Arbeiten mit neural-style
Stiltransfer für Videoclips
Postproduktion
Alternative Techniken