davidBelanger / SPEN

Structured Prediction Energy Networks in Torch
131 stars 19 forks source link

Installing problem #6

Open heejincs opened 6 years ago

heejincs commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

Thanks a lot for figuring this out! If you get a chance, please make a pull request. Otherwise, I can fix this some time in the future.

On Sun, Oct 8, 2017 at 12:01 PM, heejincs notifications@github.com wrote:

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.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/davidBelanger/SPEN/issues/6#issuecomment-335016422, or mute the thread https://github.com/notifications/unsubscribe-auth/ABH_qgUiiBAKa4tWVF_Mnw7ZkMRjNSSDks5sqPHVgaJpZM4PxgcM .