Skip to content

Commit

Permalink
[hotfix] swintrainyaml
Browse files Browse the repository at this point in the history
  • Loading branch information
vhehduatks committed May 4, 2022
1 parent a9e2ffc commit 1bba5ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
10 changes: 5 additions & 5 deletions Swin-Transformer-Semantic-Segmentation/simple_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ def main(config_train):
cfg.checkpoint_config['interval'] = config_train['eval_interval']

# -- dataset
if config_train['train_data_dir_root']:
cfg.data['train']['img_dir']=os.path.join(config_train['train_data_dir_root'],'images/training')
cfg.data['train']['ann_dir']=os.path.join(config_train['train_data_dir_root'],'annotations/training')
cfg.data['val']['img_dir']=os.path.join(config_train['train_data_dir_root'],'images/training')
cfg.data['val']['ann_dir']=os.path.join(config_train['train_data_dir_root'],'annotations/training')
if config_train['data_dir_root']:
cfg.data['train']['img_dir']=os.path.join(config_train['data_dir_root'],'images/training')
cfg.data['train']['ann_dir']=os.path.join(config_train['data_dir_root'],'annotations/training')
cfg.data['val']['img_dir']=os.path.join(config_train['data_dir_root'],'images/validation')
cfg.data['val']['ann_dir']=os.path.join(config_train['data_dir_root'],'annotations/validation')
datasets = [build_dataset(cfg.data.train)]

# -- build model
Expand Down
6 changes: 3 additions & 3 deletions Swin-Transformer-Semantic-Segmentation/train.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ config_dir : '_base_/custom'
config_file : 'custom_config'

## -- wandb
wandb : False
wandb : True
wandb_proj : 'Semantic Segmentation'
wandb_name : 'uperswin_512_512'
log_interval : 50

# -- hyperparameter
seed : 1995
seed : 84
batch_size : 8
lr : 0.00006

Expand All @@ -24,5 +24,5 @@ ckpt_name : 'upernet_swin_base_patch4_window7_512x512'
## -- save best model
save_best_model : True

train_data_dir_root : '/opt/ml/input/mmseg'
data_dir_root : '/opt/ml/input/mmseg'

0 comments on commit 1bba5ea

Please sign in to comment.