train_AMP_1GPU.sh 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/usr/bin/env bash
  2. # Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved.
  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. rm -rf /results
  16. BASEDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
  17. export CUDA_VISIBLE_DEVICES=0
  18. python ${BASEDIR}/../mask_rcnn_main.py \
  19. --mode="train_and_eval" \
  20. --checkpoint="/model/resnet/resnet-nhwc-2018-02-07/model.ckpt-112603" \
  21. --eval_samples=5000 \
  22. --init_learning_rate=0.005 \
  23. --learning_rate_steps="240000,320000" \
  24. --model_dir="/results/" \
  25. --num_steps_per_eval=29568 \
  26. --total_steps=360000 \
  27. --train_batch_size=4 \
  28. --eval_batch_size=8 \
  29. --training_file_pattern="/data/train*.tfrecord" \
  30. --validation_file_pattern="/data/val*.tfrecord" \
  31. --val_json_file="/data/annotations/instances_val2017.json" \
  32. --amp \
  33. --use_batched_nms \
  34. --xla \
  35. --nouse_custom_box_proposals_op