Coder Social home page Coder Social logo

fahad021 / 02456-deep-learning-with-pytorch Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deeplearningdtu/02456-deep-learning-with-pytorch

0.0 1.0 0.0 19.05 MB

Exercises and supplementary material for the deep learning course 02456 using PyTorch.

Jupyter Notebook 98.11% Shell 0.03% Python 1.87%

02456-deep-learning-with-pytorch's Introduction

02456-deep-learning-with-PyTorch

This repository contains exercises for the DTU course 02456 Deep Learning. The exercises are written in Python programming language and formatted into Jupyter Notebooks.

This repository borrows heavily from previous works, in particular:

  • 2015 DTU Summerschool in Deep Learning. A PhD summerschool that was held at DTU in 2015. Exercises both in numpy and Theano.

  • 02456-deep-learning. Previous version of the course material for this course, but using TensorFlow for the exercises.

  • Pytorch Tutorial. A remix popular deep learning materials, including material from 02456, collected in one coherent package using PyTorch, with a focus on natural language processing (NLP)

  • pytorch/tutorials. Official tutorials from the PyTorch repo.

Setup

We will use Docker to manage the software needed for the exercises.

  • NB: If you have a NVIDIA GPU you should follow the GPU instructions below, as a GPU enables you to run the exercises considerably faster.
  • NB: If you are using Windows things are a bit more difficult. We will help you the best we can, but be prepared to do some resaerch on your own.

CPU (Linux & mac)

First you need to install Docker.

Setup Docker by typing this in the command line in the exercise folder (this one)

  • docker build -t munkai/pytorch:cpu -f Dockerfile.cpu .

Start Docker container

  • docker run -it -p 8888:8888 -v `pwd`:/work munkai/pytorch:cpu ./jupyter_run.sh

Go to your browser, and type in http://localhost:8888. It will ask for a password (token) that you can copy from your terminal.

GPU (Linux & mac)

Setting up your GPU may take a while, and you might need to consult your favorite search engine. You need Nvidia and nvidia-docker installed for this.

Make sure you have Nvidia's drivers installed for your system. The folowing instructions will install CUDA and NVIDA drivers on ubuntu 16.04. Adjust as appropriate.

DISTRO=ubuntu
VERSION=1604
ARCH=x86_64
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/${DISTRO}${VERSION}/${ARCH}/7fa2af80.pub
sudo sh -c 'echo "deb http://developer.download.nvidia.com/compute/cuda/repos/${DISTRO}${VERSION}/${ARCH}/" > /etc/apt/sources.list.d/cuda.list'
sudo apt-get update && sudo apt-get install -y --no-install-recommends cuda-drivers

Install nvidia-docker: See https://github.com/NVIDIA/nvidia-docker on how to install nvidia-docker.

Setup Docker with GPU by typing this in the command line in the exercise folder (this one)

  • docker build -t munkai/pytorch:gpu -f Dockerfile.gpu .

Running docker with a CUDA-enabled machine

  • nvidia-docker run -it -p 8888:8888 -v `pwd`:/work munkai/pytorch:gpu ./jupyter_run.sh

Go to your browser, and type in http://localhost:8888. It will ask for a password (token) that you can copy from your terminal.

CPU (Windows)

The following instructions will help you setup Docker on Windows.

  1. Install install Docker
  2. Make drive shareable - complete steps 1-3 in this guide
  3. Setup Docker by typing this in the command line in the exercise folder (this one)
  4. docker build -t munkai/pytorch:cpu -f Dockerfile.cpu .
  5. Make sure that jupyter_run.sh has Unix style line endings (git has probaly made it Windos style when you downloaded. Text editors like Sublime can change that).
  6. Run Docker (change command to match your setup)
  7. docker run -v c:/PATH/TO/EXERCISES/02456-deep-learning-with-PyTorch:/work -it --rm -p 8888:8888 munkai/pytorch:cpu ./jupyter_run.sh
  8. Go to your browser, and type in http://localhost:8888. It will ask for a password (token) that you can copy from your terminal.

And you are done! Once setup is complete you only need to perform the last 2 steps to get up and running.

Debugging

If you are having issues we have made a list of problems and solutions to help you. Plase help us extend this list and help people in the future by letting us know about you issues and the solutions you found.

GPU (Windows)

We haven't tested this, but it should be easy to combine the GPU (Linux & mac) and CPU (Windows) guides above. Let us know if this works/doesn't work for you.

7. Additional content

If you're interested in some PyTorch codebases check out the following links (reinforcement learning, GANTs, ResNet, etc).

02456-deep-learning-with-pytorch's People

Contributors

addtt avatar alrojo avatar captaine avatar faur avatar jonasbusk avatar nicklashansen avatar pihalf avatar s161174 avatar wohlert avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.