• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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"""
16network config setting, will be used in train.py and eval.py
17"""
18from easydict import EasyDict as ed
19
20config = ed({
21    "class_num": 1001,
22    "batch_size": 32,
23    "eval_interval": 1,
24    "eval_batch_size": 50,
25    "loss_scale": 1024,
26    "momentum": 0.9,
27    "weight_decay": 1e-4,
28    "use_nesterov": True,
29    "epoch_size": 90,
30    "pretrained_epoch_size": 1,
31    "buffer_size": 1000,
32    "image_height": 224,
33    "image_width": 224,
34    "save_checkpoint": False,
35    "save_checkpoint_epochs": 5,
36    "keep_checkpoint_max": 10,
37    "save_checkpoint_path": "./",
38    "warmup_epochs": 0,
39    "lr_decay_mode": "cosine",
40    "use_label_smooth": True,
41    "label_smooth_factor": 0.1,
42    "lr_init": 0,
43    "lr_max": 0.1,
44    "use_lars": True,
45    "lars_epsilon": 1e-8,
46    "lars_coefficient": 0.001
47})
48