benchmark.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. #!/bin/sh
  2. set -x
  3. benchmark_photo() {
  4. dir=./benchmarks/${1}/${2}/${3}
  5. mkdir -p ${dir}
  6. th tools/benchmark.lua -dir data/${1} -model1\_dir models/${2}/photo -method scale -filter Catrom -color y -range\_bug 1 -tta ${3} -force_cudnn 1 -output_dir ${dir} -save_info 1 -show_progress 0
  7. }
  8. run_benchmark_photo() {
  9. for tta in 0 1
  10. do
  11. for dataset in bsd100 urban100
  12. do
  13. benchmark_photo ${dataset} vgg_7 ${tta}
  14. benchmark_photo ${dataset} upconv_7 ${tta}
  15. benchmark_photo ${dataset} upconv_7l ${tta}
  16. done
  17. done
  18. }
  19. benchmark_art() {
  20. dir=./benchmarks/${1}/${2}/${3}
  21. mkdir -p ${dir}
  22. th tools/benchmark.lua -dir data/${1} -model1\_dir models/${2}/art -method scale -filter Lanczos -color y -range\_bug 1 -tta ${3} -force_cudnn 1 -output_dir ${dir} -save_info 1 -show_progress 0
  23. }
  24. run_benchmark_art() {
  25. for tta in 0 1
  26. do
  27. benchmark_art art_test vgg_7 ${tta}
  28. benchmark_art art_test upconv_7 ${tta}
  29. benchmark_art art_test upconv_7l ${tta}
  30. done
  31. }
  32. #run_benchmark_photo
  33. run_benchmark_art