Code Monkey home page Code Monkey logo

pytorch-tutorial's Introduction

Most complete PyTorch and NLP tutorial in existence

This repo is a remix of the most popular online courses starting from applied deep learning and increasingly moving into more theoretical content with a pytorch translation of Stanford NLP's CS224d 2017 course. This course is a natural extension of fast.ai's 2018 deep learning tutorial. Lastly, the tutorial encompasses the AllenNLP library for building advanced deep learning systems and researching in NLP.

Amongst courses where content is remixed are

Estimated time for completion of all content, given prerequisites are satisfied 2 months (full time).

Prerequisites

Prerequisites for these tutorials are understanding of linear algebra and python. If you do not understand linear algegbra, we recommend either

Linear Algebra

  1. Crash course (often sufficient for engineers)
  2. Thorough introduction (recommended for researchers)

Going through the thorough introduction to linear algebra from scratch is about 2 months (full time). The crash course should take about 1 day to complete.

Python

  1. Crash course
  2. Thorough introduction

Going through the thorough introduction to computer science from scratch is about 1 month (full time). The crash course should take about 1 day to complete.

Docker

To run the labs we will use Docker, which is ellaborated below.

See https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce on how to install docker.

Build image

CPU

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

GPU

Also available on dockerhub, so simply use the docker run command to fetch remote version.

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

Start container

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

Running docker with a CUDA-enabled machine

You need Nvidia and nvidia-docker installed for this.

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

Install Nvidia

Make sure you have Nvidia's drivers installed for your system. Following is install instructions for ubuntu 16.04

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.

pytorch-tutorial's People

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.