Coder Social home page Coder Social logo

junwei-pan / practical6 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oxford-cs-ml-2015/practical6

0.0 2.0 0.0 355 KB

Practical 6: LSTM language models

Home Page: https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/

Lua 98.51% Shell 1.49%

practical6's Introduction

Practical 6

Machine Learning, spring 2015

In this practical, we train an LSTM for character-level language modelling. Since this is the last week for practicals, it will be extremely short and does not require writing code, and is due by the end of the Friday's session (regardless of whether you are from the Wednesday or Friday session).

See PDF for details.

Setup

Setup will be the same as last time in practical 1. Please refer to the practical 1 repository, and run the script as instructed last time. If you get an error that nngraph is not installed, run:

luarocks install nngraph

Do this before reading the pdf

Clone the practical and download the associated data:

git clone https://github.com/oxford-cs-ml-2015/practical6.git
cd practical6
wget http://www.cs.ox.ac.uk/people/brendan.shillingford/teaching/practical6-data.tar.gz
tar xvf practical6-data.tar.gz

and start training the model:

th train.lua -vocabfile vocab.t7 -datafile train.t7 

Make note of the time at which you run the train.lua script. Every several iterations, the training script will save the current model (including its parameters) to a file called model_autosave.t7. You can make snapshots of this file if you want, but this is not required for the practical.

For users outside of Oxford's CS lab

The practical6-data.tar.gz file is for 64-bit little-endian CPUs. For all other machines (i.e. if running uname -m doesn't print out x86_64), then see this comment for instructions: https://github.com/oxford-cs-ml-2015/practical6/commit/96749c8d9bc93f864c94c048a3c8cd73f59f733b#commitcomment-11003337. This is the same data, but using ASCII serialization. You may also want to use this faster LSTM factory method, instead of the one in this repository: https://gist.github.com/karpathy/7bae8033dcf5ca2630ba which performs all the matrix multiplications at once followed by several nn.Narrow operations to extract out the gate values; read its comments for details.

See course page for practicals

https://www.cs.ox.ac.uk/people/nando.defreitas/machinelearning/

practical6's People

Contributors

bshillingford avatar

Watchers

 avatar  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.