This code:
require 'cutorch'
require 'dpnn'
local v = torch.CudaTensor.zeros(torch.CudaTensor.new(), 5)
v[3] = 1
local one_hot = nn.OneHot(5):cuda()
one_hot:forward(v)
Gives me this error:
THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-75/cutorch/lib/THC/generic/THCStorage.c line=147 error=77 : an illegal memory access was encountered
Am I missing something really, really obvious or is this a really weird bug?