DeepDISC Configs

Config References

 1# ---------------------------------------------------------------------------- #
 2bs = 1
 3
 4metadata = OmegaConf.create()
 5metadata.classes = ["object"]
 6
 7numclasses = len(metadata.classes)
 8
 9# ---------------------------------------------------------------------------- #
10# Standard, Lazy-Config-style config values
11# ---------------------------------------------------------------------------- #
12# Baselines
13from ..COCO.cascade_mask_rcnn_swin_b_in21k_50ep import (
14    dataloader,
15    lr_multiplier,
16    model,
17    optimizer,
18    train,
19)
20
21# Overrides
22model.proposal_generator.anchor_generator.sizes = [[8], [16], [32], [64], [128]]
23model.roi_heads.num_classes = numclasses
24model.roi_heads.batch_size_per_image = 512
25
26# DC2 overrides
27model.backbone.bottom_up.in_chans = 6
28model.pixel_mean = [
29    0.05381286,
30    0.04986344,
31    0.07526361,
32    0.10420945,
33    0.14229655,
34    0.21245764,
35]
36model.pixel_std = [2.9318833, 1.8443471, 2.581817, 3.5950038, 4.5809164, 7.302009]
37
38
39dataloader.train.total_batch_size = bs
40dataloader.epoch = 10
41
42
43# ---------------------------------------------------------------------------- #
44# Yacs-style config values
45# ---------------------------------------------------------------------------- #
46# Baselines
47from .yacs_style_defaults import (
48    MISC,
49    DATALOADER,
50    DATASETS,
51    GLOBAL,
52    INPUT,
53    MODEL,
54    SOLVER,
55    TEST,
56)
57
58# Overrides
59DATALOADER.PREFETCH_FACTOR = 2
60
61DATASETS.TRAIN = "astro_train"
62DATASETS.TEST = "astro_val"
63
64SOLVER.BASE_LR = 0.001
65SOLVER.CLIP_GRADIENTS.ENABLED = True
66# Type of gradient clipping, currently 2 values are supported:
67# - "value": the absolute values of elements of each gradients are clipped
68# - "norm": the norm of the gradient for each parameter is clipped thus
69#   affecting all elements in the parameter
70SOLVER.CLIP_GRADIENTS.CLIP_TYPE = "norm"
71# Maximum absolute value used for clipping gradients
72# Floating point number p for L-p norm to be used with the "norm"
73# gradient clipping type; for L-inf, please specify .inf
74SOLVER.CLIP_GRADIENTS.NORM_TYPE = 5.0
75SOLVER.IMS_PER_BATCH = bs