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

Installing problem #6

Open
heejincs opened this issue Oct 7, 2017 · 2 comments
Open

Installing problem #6

heejincs opened this issue Oct 7, 2017 · 2 comments

Comments

@heejincs
Copy link

heejincs commented Oct 7, 2017

Hi, thank you for the great project. I am trying to run it, and having a wired problem in all different computers.

  1. SSH to my ubuntu machine

  2. Install Torch (from http://torch.ch/docs/getting-started.html)

git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch; bash install-deps;
./install.sh
source ~/.bashrc

  1. Install CUDA development kit - This is needed for cutorch (From nvidia)

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.0.176-1_amd64.deb

sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb``sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub

sudo apt-get update

sudo apt-get install cuda

  1. Dependency for SPEN (From SPEN github)
    cd ~
    git clone https://github.com/davidBelanger/SPEN.git
    luarocks install torch
    luarocks install nn
    luarocks install cutorch
    luarocks install cunn
    luarocks install optim
    luarocks install nngraph

git clone https://github.com/davidBelanger/torch-util.git

  1. Run
    chmod +x quick_start_tagging.sh # example
    ./quick_start_tagging.sh

But I still get

heejin@hubuntu:~/SPEN$ ./quick_start_tagging.sh
Creating Synthetic Train/Test Data by Drawing from a CRF
/home/heejin/torch/install/bin/luajit: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/torch/init.lua:102: class nn.OneHot has been already assigned a parent class

stack traceback:
[C]: in function 'error'
/home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
test/test_data_serialization_and_loading.lua:1: in main chunk
[C]: in function 'dofile'
...ejin/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Training a CRF on the Data to Test that Obtainable Accuracy Approaches the Accuracy of the True Model
/home/heejin/torch/install/bin/luajit: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/torch/init.lua:102: class nn.OneHot has been already assigned a parent class

stack traceback:
[C]: in function 'error'
/home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
test/test_chain_crf_mle_from_file.lua:2: in main chunk
[C]: in function 'dofile'
...ejin/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Training a SPEN on the Data using tag_cmd.sh
tag_cmd.sh: 5: [: 0: unexpected operator
-gradient_clip 1.0 -optim_method adam -evaluation_frequency 25 -save_frequency 25 -adam_epsilon 1e-8 -batches_per_epoch 100 -learning_rate_decay 0.0 -learning_rate 0.001 -num_epochs 30 -training_mode pretrain_unaries
running in tag-runs/Sat_Oct__7_16:48:17_CDT_2017
/home/heejin/torch/install/bin/luajit: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: /home/heejin/torch/install/share/lua/5.1/torch/init.lua:102: class nn.OneHot has been already assigned a parent class

stack traceback:
[C]: in function 'error'
/home/heejin/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
main.lua:4: in main chunk
[C]: in function 'dofile'
...ejin/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00405d50

Could you help please?

Thank you.

@heejincs
Copy link
Author

heejincs commented Oct 8, 2017

I solve the problem.
It goes something like OneShot class has been added to nn package, so we should
"remove require OneShot.lua" line the in the Imports file.

@davidBelanger
Copy link
Owner

davidBelanger commented Oct 10, 2017 via email

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

2 participants