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.

config.py 1.7 kB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. # Copyright 2020 Huawei Technologies Co., Ltd
  2. #
  3. # Licensed under the Apache License, Version 2.0 (the "License");
  4. # you may not use this file except in compliance with the License.
  5. # You may obtain a copy of the License at
  6. #
  7. # http://www.apache.org/licenses/LICENSE-2.0
  8. #
  9. # Unless required by applicable law or agreed to in writing, software
  10. # distributed under the License is distributed on an "AS IS" BASIS,
  11. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. # See the License for the specific language governing permissions and
  13. # limitations under the License.
  14. # ===========================================================================
  15. """Network config setting, will be used in train.py and eval.py"""
  16. from easydict import EasyDict as ed
  17. config = ed({
  18. 'per_batch_size': 128,
  19. 'dst_h': 112,
  20. 'dst_w': 112,
  21. 'workers': 8,
  22. 'attri_num': 3,
  23. 'classes': '9,2,2',
  24. 'backbone': 'resnet18',
  25. 'loss_scale': 1024,
  26. 'flat_dim': 512,
  27. 'fc_dim': 256,
  28. 'lr': 0.009,
  29. 'lr_scale': 1,
  30. 'lr_epochs': [20, 30, 50],
  31. 'weight_decay': 0.0005,
  32. 'momentum': 0.9,
  33. 'max_epoch': 70,
  34. 'warmup_epochs': 0,
  35. 'log_interval': 10,
  36. 'ckpt_path': '../../output',
  37. # data_to_mindrecord parameter
  38. 'eval_dataset_txt_file': 'Your_label_txt_file',
  39. 'eval_mindrecord_file_name': 'Your_output_path/data_test.mindrecord',
  40. 'train_dataset_txt_file': 'Your_label_txt_file',
  41. 'train_mindrecord_file_name': 'Your_output_path/data_train.mindrecord',
  42. 'train_append_dataset_txt_file': 'Your_label_txt_file',
  43. 'train_append_mindrecord_file_name': 'Your_previous_output_path/data_train.mindrecord0'
  44. })