version=1

for reduc_bot in 8 7 6 5 4 3 2 
do
	Reduction_bot=$((2 ** $reduc_bot))
	Series_reduction_bot=$(($2 / $Reduction_bot))
	Seuil_bot=4

	if [[ $Series_reduction_bot -ge $Seuil_bot ]]
	then 

		for reduc_mid in 5 4 3 2 1
		do
			Reduction_mid=$((2 ** $reduc_mid))
			Series_reduction_mid=$(($2 / ($Reduction_bot * $Reduction_mid)))
			Seuil_mid=2

			if [[ $Series_reduction_mid -ge $Seuil_mid ]]
			then 	
				for nb_embed_bot in 32
				do
					for nb_embed_mid in 32
					do
						python3 ./unsupervised_model/train_HVQ_AE.py $1 --n_embed_bot $nb_embed_bot --n_embed_mid $nb_embed_mid --scale_reduc_bot $reduc_bot --scale_reduc_mid $reduc_mid --version $version --num_training 50000
						python3 ./unsupervised_model/compute_ngrams.py $1 --n_embed_bot $nb_embed_bot --n_embed_mid $nb_embed_mid --scale_reduc_bot $reduc_bot --scale_reduc_mid $reduc_mid --version $version
						python3 ./classifiers/LogisticReg_on_ngrams.py $1 --version $version
						version=$((version+1))
					done
				done
			else
				continue
			fi
			continue
		done

	else 
		continue
	fi 
	continue 
done

python3 ./classifiers/LogisticReg_on_ngrams_final.py $1


