File size: 1,727 Bytes
82b6bd0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 |
net = 'CDXFormer'
######################## base_config #########################
epoch = 200
gpus = [0]
save_top_k = 1
save_last = True
check_val_every_n_epoch = 1
logging_interval = 'epoch'
resume_ckpt_path = None
monitor_val = 'val_change_f1'
monitor_test = ['test_change_f1']
argmax = True
test_ckpt_path = "work_dirs/CLCD_BS4_epoch200/CDXFormer/version_0/ckpts/test/test_change_f1/test_change_f1=0.9289-epoch=2.ckpt"
exp_name = 'WHUCD_epoch200{}/{}'.format(epoch, net)
######################## dataset_config ######################
_base_ = [
'./_base_/WHUCD_config.py',
]
num_class = 2
ignore_index = 255
######################### model_config #########################
model_config = dict(
backbone = dict(
type = 'Base',
name = 'Seaformer',
),
decoderhead = dict(
type = 'CTTF',
channels = [64, 128, 192, 256]
)
)
loss_config = dict(
type = 'myLoss',
loss_name = ['FocalLoss', 'dice_loss'],
loss_weight = [0.5, 0.5],
param = dict(
FocalLoss = dict(
gamma=0,
alpha=None
),
dice_loss = dict(
eps=1e-7
)
)
)
######################## optimizer_config ######################
optimizer_config = dict(
optimizer = dict(
type = 'SGD',
lr = 0.05,
momentum=0.9,
weight_decay = 5e-5,
lr_mode = "single"
),
scheduler = dict(
type = 'step',
step_size = 100,
gamma = 0.1
)
)
metric_cfg1 = dict(
task = 'multiclass',
average='micro',
num_classes = num_class,
)
metric_cfg2 = dict(
task = 'multiclass',
average='none',
num_classes = num_class,
)
|