#/usr/bin/bash datadir='data/__new/lobby_fovea_r360x80_t1.0' trainsetname='train1' testsetname='test1' trainset="data/__new/lobby_fovea_r360x80_t1.0/$trainsetname.json" testset="data/__new/lobby_fovea_r360x80_t1.0/$testsetname.json" epochs=50 n_nets=$1 nf=$2 n_layers=$3 configid="fovea@snerffast${n_nets}-rgb_e6_fc${nf}x${n_layers}_d2.00-50.00_s64_~p" if [ ! -f "$datadir/$configid/model-epoch_$epochs.pth" ]; then cont_epoch=0 for ((i=$epochs-1;i>0;i--)) do if [ -f "$datadir/$configid/model-epoch_$i.pth" ]; then cont_epoch=$i break fi done if [ ${cont_epoch} -gt 0 ]; then python run_spherical_view_syn.py $trainset -e $epochs -m $configid/model-epoch_${cont_epoch}.pth else python run_spherical_view_syn.py $trainset -i $configid -e $epochs fi fi if ! ls $datadir/$configid/output_$epochs/perf_* >/dev/null 2>&1; then python run_spherical_view_syn.py $trainset -t -m $configid/model-epoch_$epochs.pth -o perf python run_spherical_view_syn.py $testset -t -m $configid/model-epoch_$epochs.pth -o perf fi if [ ! -d "$datadir/$configid/output_$epochs/${testsetname}_color" ]; then python run_spherical_view_syn.py $testset -t -m $configid/model-epoch_$epochs.pth -o color fi