csyanbin / Semi-supervised_Neural_Network

forked from https://github.com/jibancanyang/Semi-supervised_Neural_Network
4 stars 2 forks source link

question of script #1

Open GRP2019 opened 5 years ago

GRP2019 commented 5 years ago

when I run script file ladder.sh, why it shows File "parameter.py", line 4, in rand = sys.argv[2] IndexError: List Index out of range

How can I fix it?

csyanbin commented 5 years ago

I think you should pass the parameter "rand " when running this script.

GRP2019 commented 5 years ago

Do you mean I should rewirte "ladder.sh"? I don't know much about python script... Could you tell me how to rewite? Original "ladder.sh" file is:

!/bin/bash

echo $1 for k in $( seq 1 20 ) do python3 ladder.py $1 ${k} 2>&1 | tee log/loglabel$1${k}.log echo $1 ${k} done

csyanbin commented 5 years ago

I changed the original ladder network scripts to do my own experiments. The steps should be: (1). "cd utils", then run "sh hela.sh " to generate the data (2). "cd ladder_network", then run "sh ladder.sh 1". Here 1 indicates 1 labeled example in each class, you can change the number.

I recommend you to refer to the original github repo for more details. The original ladder implementation is here: https://github.com/jibancanyang/Semi-supervised_Neural_Network

GRP2019 commented 5 years ago

It works! Thank you! How kind of you! ^.^