g=6
bdim=6
for model in lstm gru o2rnn mirnn
do
    for seed in 4240 1136 8204 6264 8634 1646 3199 6735 3933 1470
    do
        for mdim in 1 2 3 4 5
        do
            for nbin in 0 1
            do
                if [[ $nbin == 0 ]]
                then
                    dsize=50
                else
                    dsize=100
                fi
                sdim=$((bdim*mdim))
                echo "======================================================================="
                echo "model : ${model} seed : ${seed} state_dim : ${sdim} test bin : ${nbin}"
                echo "======================================================================="

                CUDA_VISIBLE_DEVICES=0 python test.py \
                    --suffix "dyck_g${g}_sdim_${sdim}_bce" \
                    --load_model "../models/dfa_stability_rnn_${model}_dyck_${g}_sdim_${sdim}_bce_seed_${seed}/best.pth" \
                    --batch_size 2000 \
                    --seed $seed \
                    --state_dim $sdim\
                    --model "rnn" \
                    --rnn_cell $model \
                    --mtype "classification" \
                    --grammar "dyck-${g}"\
                    --nbin $nbin \
                    --hinit 1 \
                    --dropout 0\
                    --nlayers 1 \
                    --dataset "dyck_${g}_${dsize}"\
                    --result_file "../results/dyck_rnn/g${g}_${model}_sdim_${sdim}_nbin_${nbin}.json"
            done
        done 
    done
done 
