samehkhamis / cudnn.torch

Torch-7 FFI bindings for NVIDIA CuDNN

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cudnn.torch

Torch7 FFI bindings for NVidia CuDNN (R2) kernels!

Modules are API compatible their nn equivalents. Fully unit-tested against nn implementations.

Installation

Modules

-- All inputs have to be 3D or 4D(batch-mode), except ReLU, Tanh and Sigmoid
cudnn.SpatialConvolution(nInputPlane, nOutputPlane, kW, kH, [dW = 1], [dH = 1], [padW = 0], [padH = 0], [groups = 1])
cudnn.SpatialMaxPooling(kW, kH, dW, dH, padW, padH)
cudnn.SpatialAveragePooling(kW, kH, dW, dH, padW, padH)

-- the pointwise functions take an additional optional argument. if inplace=true then they do operations in-place without using any extra memory for themselves
cudnn.ReLU(inplace[=false])
cudnn.Tanh(inplace[=false])
cudnn.Sigmoid(inplace[=false])

-- SoftMax can be run in fast mode or accurate mode. Default is accurate mode.
cudnn.SoftMax(fastMode [= false])          -- SoftMax across each image (just like nn.SoftMax)
cudnn.SpatialSoftMax(fastMode [= false])   -- SoftMax across feature-maps (per spatial location)

-- Volumetric inputs (4D or 5D batched mode)
cudnn.VolumetricConvolution(nInputPlane, nOutputPlane, kT, kW, kH, dT, dW, dH, padT, padW, padH)

I have no time to support these, so please don't expect a quick response to filed github issues.

For version CuDNN R1, checkout the branch R1

About

Torch-7 FFI bindings for NVIDIA CuDNN

License:BSD 2-Clause "Simplified" License


Languages

Language:Lua 99.4%Language:CMake 0.6%