run_extract_dev.sh 2.02 KB
for task in task1 task2 task3
do

    for embedding in word2vecf wang2vec word2vec distant
    do

        for size in 100 200 300
        do

            for kfold in 0 1 2 3
            do

                echo "$task $embedding $size $kfold"

                if [ -e model/cnn_${task}_${kfold}_${embedding}_size${size}_123.h5 ]
                then

                    if [ ! -e results/cnn_${task}_${kfold}_${embedding}_size${size}_123.txt ]
                    then

                        THEANO_FLAGS=mode=FAST_RUN,device=gpu0,nvcc.fastmath=True,floatX=float32 python bin/results_cnn.py embedding/${embedding}_size${size}_win3.bin data/${task}_dev_${kfold}.tokenize model/cnn_${task}_${kfold}_${embedding}_size${size}_123 > results/cnn_${task}_${kfold}_${embedding}_size${size}_123.txt
                    fi
                fi

                if [ -e model/cnn_${task}_${kfold}_${embedding}_size${size}_345.h5 ]
                then
                    if [ ! -e results/cnn_${task}_${kfold}_${embedding}_size${size}_345.txt ]
                    then

                        THEANO_FLAGS=mode=FAST_RUN,device=gpu0,nvcc.fastmath=True,floatX=float32 python bin/results_cnn.py embedding/${embedding}_size${size}_win3.bin data/${task}_dev_${kfold}.tokenize model/cnn_${task}_${kfold}_${embedding}_size${size}_345 > results/cnn_${task}_${kfold}_${embedding}_size${size}_345.txt
                    fi
                fi

                if [ -e model/cnn_${task}_${kfold}_${embedding}_size${size}_567.h5 ]
                then
                    if [ ! -e results/cnn_${task}_${kfold}_${embedding}_size${size}_567.txt ]
                    then

                        THEANO_FLAGS=mode=FAST_RUN,device=gpu0,nvcc.fastmath=True,floatX=float32 python bin/results_cnn.py embedding/${embedding}_size${size}_win3.bin data/${task}_dev_${kfold}.tokenize model/cnn_${task}_${kfold}_${embedding}_size${size}_567 > results/cnn_${task}_${kfold}_${embedding}_size${size}_567.txt
                    fi
                fi

            done

        done

    done

done