Giter Club home page Giter Club logo

fbcunn's Introduction

fbcunn - Deep Learning CUDA Extensions from Facebook AI Research.

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 endeavors. 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 modules that use 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 (usable for MaxOut).
  • more goodies. Full documentation and spec is here: https://facebook.github.io/fbcunn/fbcunn/

Examples:

  • Training an imagenet based classifier in Torch-7 using multiple GPUs (showcasing our FFT convolutions as well as our ModelParallel container)

Why?

We know that science and technology progress faster when researchers exchange ideas and tools. Making significant progress in AI will take the participation of the entire research community, and We want to do what we can to make the field progress faster. That is why we love open science and open source. We publish our research with open access, very often on Arxiv, on our members' web sites, and eventually on the FAIR publications page. And we share our code right here!

Who is this for?

This will help you if you want to train large-scale deep learning systems (particularly convolutional nets) for image recognition, NLP, or other applications. This will help you particularly well if already are a Torch user.

How to install them?

You will find step-by-step and detailed installation instructions in INSTALL.md

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. There is also a practical example of ModelParallel in examples/imagenet. 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. For an example, look at examples/imagenet
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, generated with torch-dokx, are available at http://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 br-rtbhouse avatar jonathantompson avatar mys007 avatar nicolasvasilache avatar orian avatar shariq avatar soumith 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.