Giter Club home page Giter Club logo

Comments (10)

raidancampbell avatar raidancampbell commented on June 24, 2024

I also experienced this error. Unfortunately, I have been poking around quite a bit in an effort to solve an unrelated issue.

If I recall correctly, I tried luarocks install nn, which may have fixed it, then luarocks install torch, which fixed not being able to find the cunn and cutorch libraries. I'm fairly certain the latter command is going to come back to haunt me: installing torch through luarocks over an existing torch install doesn't seem very clean

from char-rnn.

shuokay avatar shuokay commented on June 24, 2024

Everything goes well now. first I update the torch by update.sh, second I link the cuda to cuda-7.5, third I run the torch's ./install.sh again. then everything goes well. But I still can't figure the problem. I just resolve this problem by accident. Hope this can help somebody.
I will close this issue.

from char-rnn.

danbri avatar danbri commented on June 24, 2024

fwiw I've seen this recently too

from char-rnn.

danbri avatar danbri commented on June 24, 2024

see also torch/nn@6bcdc6f ... I fixed an installation by brutishly copying in latest version of that class over the top of luajit. #notproud

from char-rnn.

karpathy avatar karpathy commented on June 24, 2024

I'm not sure what's the cause for this issue or when it started. Is it cuda version dependent?

from char-rnn.

raidancampbell avatar raidancampbell commented on June 24, 2024

I can confirm that I did update CUDA before this happened, but I can't confirm that the update was the cause, as I twiddled with too many other things in that time

from char-rnn.

soumith avatar soumith commented on June 24, 2024

the nn and cunn versions looks out of date. that's what this error message is about.

from char-rnn.

 avatar commented on June 24, 2024

Just writing down my fix for the same error:

user@xyz:~/code/char-rnn$ th train.lua -data_dir data/tinyshakespeare
using CUDA on GPU 0...
vocab.t7 and data.t7 do not exist. Running preprocessing...
one-time setup: preprocessing input text file data/tinyshakespeare/input.txt...
loading text file...
creating vocabulary mapping...
putting data into tensor...
saving data/tinyshakespeare/vocab.t7
saving data/tinyshakespeare/data.t7
loading data files...
cutting off end of data so that the batches/sequences divide evenly
reshaping tensor...
data load done. Number of data batches in train: 423, val: 23, test: 0
vocab size: 65
creating an lstm with 2 layers
number of parameters in the model: 240321
cloning rnn
cloning criterion
/Users/user/code/torch/install/bin/luajit: ...ode/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:50: bad argument #1 to 'ClassNLLCriterion_updateOutput' (torch.CudaTensor expected, got nn.ClassNLLCriterion)
stack traceback:
    [C]: in function 'ClassNLLCriterion_updateOutput'
    ...ode/torch/install/share/lua/5.1/nn/ClassNLLCriterion.lua:50: in function 'forward'
    train.lua:254: in function 'opfunc'
    .../user/code/torch/install/share/lua/5.1/optim/rmsprop.lua:32: in function 'rmsprop'
    train.lua:293: in main chunk
    [C]: in function 'dofile'
    ...code/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:131: in main chunk
    [C]: at 0x010e40f2e0

I am using Cuda 7.0 on NVIDIA GeForce GT 650M on my Macbook Pro

Updating torch alone did not help.

As suggested by @raidancampbell I've run luarocks install nn and it resolved the problem.

from char-rnn.

ajkl avatar ajkl commented on June 24, 2024

+1 luarocks install nn worked for me too. PR - #92

from char-rnn.

 avatar commented on June 24, 2024

the changes the current nn need to be merged into getParamsByDevice otherwise data parallel wont work

from char-rnn.

Related Issues (20)

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.