You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

run_eval.sh 1.5 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. #!/bin/bash
  2. # Copyright 2020 Huawei Technologies Co., Ltd
  3. #
  4. # Licensed under the Apache License, Version 2.0 (the "License");
  5. # you may not use this file except in compliance with the License.
  6. # You may obtain a copy of the License at
  7. #
  8. # http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. # Unless required by applicable law or agreed to in writing, software
  11. # distributed under the License is distributed on an "AS IS" BASIS,
  12. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. # ============================================================================
  16. if [ $# != 1 ]
  17. then
  18. echo "Usage: sh run_eval.sh [USE_DEVICE_ID]"
  19. exit 1
  20. fi
  21. dirname_path=$(dirname "$(pwd)")
  22. echo ${dirname_path}
  23. export PYTHONPATH=${dirname_path}:$PYTHONPATH
  24. export RANK_SIZE=1
  25. export RANK_ID=0
  26. USE_DEVICE_ID=$1
  27. echo 'start device '$USE_DEVICE_ID
  28. dev=`expr $USE_DEVICE_ID + 0`
  29. export DEVICE_ID=$dev
  30. EXECUTE_PATH=$(pwd)
  31. echo *******************EXECUTE_PATH= $EXECUTE_PATH
  32. if [ -d "${EXECUTE_PATH}/log_inference" ]; then
  33. echo "[INFO] Delete old log_inference log files"
  34. rm -rf ${EXECUTE_PATH}/log_inference
  35. fi
  36. mkdir ${EXECUTE_PATH}/log_inference
  37. cd ${EXECUTE_PATH}/log_inference
  38. env > ${EXECUTE_PATH}/log_inference/face_recognition.log
  39. python ${EXECUTE_PATH}/../eval.py &> ${EXECUTE_PATH}/log_inference/face_recognition.log &
  40. echo "[INFO] Start inference..."