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

How to run the code in cpu mode properly? #6

Open
ghost opened this issue Sep 2, 2016 · 1 comment
Open

How to run the code in cpu mode properly? #6

ghost opened this issue Sep 2, 2016 · 1 comment

Comments

@ghost
Copy link

ghost commented Sep 2, 2016

First of all, thanks for your great work! Now I am trying to run the code and I change the value of gpu in main_cls.lua and main_cls_int.lua to zero already. But when I run train_coco.sh, I still got such an error: Users/yobichi/torch/install/bin/luajit: main_cls.lua:56: attempt to call field 'setDevice' (a nil value). The full message is as below:

{
  img_dir : "/Users/yobichi/icml2016/resource/train2014"
  name : "coco_nc3_nt128_nz100_bs64_cls0.5_ngf196_ndf196"
  txtSize : 1024
  niter : 200
  batchSize : 64
  ndf : 196
  nz : 100
  numCaption : 3
  gpu : 3
  filenames : ""
  decay_every : 40
  cls_weight : 0.5
  noise : "normal"
  ntrain : inf
  beta1 : 0.5
  nThreads : 12
  lr_decay : 0.5
  init_g : ""
  fineSize : 64
  loadSize : 76
  print_every : 4
  ngf : 196
  use_cudnn : 1
  init_d : ""
  checkpoint_dir : "/Users/yobichi/icml2016/checkpoints"
  lr : 0.0002
  dataset : "coco"
  data_root : "/Users/yobichi/icml2016/resource/train2014_ex_t7"
  save_every : 5
  large : 0
  doc_length : 201
  nt : 128
  display_id : 103
  display : 1
}
/Users/yobichi/torch/install/bin/luajit: main_cls.lua:56: attempt to call field 'setDevice' (a nil value)
stack traceback:
    main_cls.lua:56: in main chunk
    [C]: in function 'dofile'
    ...ichi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:145: in main chunk
    [C]: at 0x0105c15ad0

Could you tell me what's wrong with it and how can I fix it? Thanks in advance!

@neonb88
Copy link

neonb88 commented Apr 10, 2018

@rylanchiu Hello, did you resolve this issue? I'm looking at a similar bug

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