Skip to content

Instantly share code, notes, and snippets.

@pratikac
Created June 4, 2015 23:32
Show Gist options
  • Save pratikac/2c9db928f095199d84e4 to your computer and use it in GitHub Desktop.
Save pratikac/2c9db928f095199d84e4 to your computer and use it in GitHub Desktop.
require 'torch'
require 'nn'
use_cpu = true
require('fakecuda').init(use_cpu)
require 'cutorch'
a = torch.randn(10)
a:cuda()
b = nn.SpatialConvolution(3,16,5,5)
b:cuda()
cutorch.synchronize()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment