Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request for correct options to run in cpu mode #12

Closed
ghost opened this issue Mar 8, 2016 · 2 comments
Closed

Request for correct options to run in cpu mode #12

ghost opened this issue Mar 8, 2016 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 8, 2016

Hi:

I'm interested in your word version of karpathy's rnn.

I'm new to torch/lua and have the original running error free on 64 bit mint with i7 in cpu mode (GPU will be next machine)

When I run your version of the sanity check I receive the following error:

$ th train.lua -gpuid -1

/home/pixelhead/torch/install/bin/luajit: /home/pixelhead/torch/install/share/lua/5.1/trepl/init.lua:383: ./util/SharedDropout.lua:3: attempt to call field 'CudaTensor' (a nil value)
stack traceback:
[C]: in function 'error'
/home/pixelhead/torch/install/share/lua/5.1/trepl/init.lua:383: in function 'require'
train.lua:119: in main chunk
[C]: in function 'dofile'
...head/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
[C]: at 0x00406670

I'm assuming 'CudaTensor' applies to GPU use only. Is there a modification I can make in 'SharedDropout.lua' or another script for CPU use?

Looking forward to comparing the output from the original to your version.

Cheers,

@ghost
Copy link
Author

ghost commented Mar 12, 2016

Found answer to my problem in issue #7 :)

@larspars Oh, figured it out,

had to change line 3 in .../word-rnn/util/SharedDropout.lua

where it says torch.CudaTensor I simply changed it to torch.Tensor and now it's good.

@ghost ghost closed this as completed Mar 12, 2016
@andreasmarkmann
Copy link

Should there be a branch statement testing the cpuid command line parameter in order to allow use on both platforms without edit?

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant