title: cuda torch integration - CudaTensor class not found
body: <p>Probably, I'm not sufficiently familiar with the dependencies stack here, but I've installed a Deep Learning project that uses Torch and CUDA: <a href="https://github.com/donglixp/lang2logic" rel="nofollow noreferrer">https://github.com/donglixp/lang2logic</a>. </p>
  
  <p>Running the project (e.g. by issuing: <code>./pretrain.sh seq2seq jobqueries lstm</code>), I get this error:</p>
  
  <pre><code>THCudaCheck FAIL file=/tmp/luarocks_cutorch-scm-1-1028/cutorch/lib/THC/THCGeneral.c line=66 error=30 : unknown error
  package cunn not found! 
  package cutorch not found!  
  If cutorch and cunn are installed, your CUDA toolkit may be improperly configured.  
  Check your CUDA toolkit installation, rebuild cutorch and cunn, and try again.  
  Falling back on CPU mode    
  ~/torch/install/share/lua/5.1/torch/File.lua:343: unknown Torch class &lt;torch.CudaTensor&gt;
  </code></pre>
  
  <p>The last error by the way, is issued from this self-explanatory piece of lua code, which checks for the availability of the CudaTensor class:</p>
  
  <pre><code> if not torch.factory(className) then
      error(string.format('unknown Torch class &lt;%s&gt;', tostring(className)))
   end
  </code></pre>
  
  <p>After getting this error, I also installed Lua's <code>cutorch</code> and <code>cunn</code> through the following commands, which seemed to have finished well.</p>
  
  <pre><code>luarocks install cutorch
  luarocks install cunn
  </code></pre>
  
  <p>But I still get the very same error.</p>
  
  <p>The only installation quirk I've noticed had been that <code>luarocks install class</code> seemed to do nothing, and I'm not running on Scientific Linux as the original author, but rather on Ubuntu 16.04.</p>
  
  <p>I had installed CUDA itself through: <code>sudo apt-get install nvidia-cuda-toolkit</code></p>
  
  <p>How would you address this integration error?</p>
  
  <p>Thanks!</p>