Git Product home page Git Product logo

fbcunn's Introduction

fbcunn - Facebook's deeplearning CUDA extensions.

What?

Deep Learning is a popular kid in machine learning these days. At Facebook AI Research we've been doing quite a bit of deep learning research. This repository contains our highly engineered deep learning modules for GPUs, to accelerate your own deep learning endeavours. It plugs into the Torch-7 framework and installs seamlessly via luarocks, and is fully compatible with torch's nn package.

In summary, we're releasing fast nn modules for Convnets and neural networks in general:

  • Fast spatial convolution module that uses FFT to accelerate convolutions. We wrote a paper about them if you'd like to read more.
  • Fast Temporal convolutions that are 1.5x to 10x faster compared to Torch's cunn implementations.
  • nn.DataParallel and nn.ModelParallel containers. Plug your model in them and see it accelerate over multiple GPUs
  • Wrappers to use FFT/IFFT as nn modules.
  • Fast LookupTable that is used for Neural Language Models and word embeddings. Much faster than the one in torch/nn
  • Hierarchical SoftMax module, now classifying 1 million classes is a practically viable strategy
  • LP and Max Pooling over feature maps.
  • more goodies. Full documentation and spec is here: https://facebook.github.io/fbcunn/fbcunn/

Why?

We love open science and open source. In short, we love sharing. We publish our research there. We share our code right here!

Who is this for?

You use Torch for your neural networks and deep learning research, or you work with another machine learning package but you like fast code regardless.

How to install them?

  • Find a machine with Ubuntu 14.04+ and an NVIDIA GPU with compute capability 3.5 or above, as well as CUDA 6.5.
  • Install Torch-7. It's awesome.
  • Install folly, fbthrift, thpp and fblualib by running this simple script. Take a lunch break, this takes some time, compiling and all...
  • That's it, now install fbcunn:
git clone https://github.com/soumith/fbcunn.git
cd fbcunn && luarocks make rocks/fbcunn-scm-1.rockspec # got get a coffee

We've worked hard to make the install as pain-free as possible. If you have an issue, use github issues, we'll try our best to help.

How to use them?

  • The DataParallel and ModelParallel modules are super-simple to use. The unit-test doubles as both an example as well as a test. If you want more examples, please do ask.
m = nn.DataParallel():add(nn.SpatialConvolution(...)):add(nn.ReLU()) -- see, so simple
  • Convolution modules are even simpler to use. They are fully API compatible with their nn equivalents
conv = nn.SpatialConvolutionCuFFT(...) -- fast spatial convolutions!
conv = nn.TemporalConvolutionFB(...) -- fast temporal convolutions!
  • LookupTable is named nn.LookupTableGPU and Hierarchical SoftMax as nn.HSM, they are super-simple to use as well, check the docs out.

https://facebook.github.io/fbcunn/fbcunn/

The unit tests in the test/ folder also double as examples! If you have a question, do ask.

I want exact details of everything...

API docs - https://facebook.github.io/fbcunn/fbcunn/

Some of the unit tests need fbnn

License

fbcunn is BSD-licensed. We also provide an additional patent grant.

fbcunn's People

Contributors

ajtulloch avatar soumith avatar

Stargazers

 avatar Theau Heral avatar

Watchers

James Cloos avatar Yann LeCun 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.