generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
filter.yaml
126 lines (106 loc) · 3.29 KB
/
filter.yaml
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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# @package _global_
# to execute this experiment run:
# python train.py experiment=filter
defaults:
- override /data: landmark
- override /model: default
- override /callbacks: filter
- override /trainer: default
# all parameters below will be merged with parameters from default configurations set above
# this allows you to overwrite only specified parameters
tags: ["filter", "resnet18"]
seed: 59
# ckpt_path: /mnt/apple/k66/filter/project/quangbd/facial-landmarks/logs/train/runs/2024-11-08_15-30-35/checkpoints/epoch_044.ckpt
# ------------------override paths------------------
# paths:
# data_dir: ${paths.root_dir}/../../../
# ------------------override configs/trainer------------------
trainer:
min_epochs: 1 # prevents early stopping
max_epochs: 70
# accelerator: gpu
# devices: 1
# ------------------override configs/model------------------
model:
net:
_target_: src.models.components.ResNet
model_name: resnet18
weights: DEFAULT
# _target_: src.models.components.CNN
# output_shape: [68, 2]
# _target_: src.models.components.MobileNet
# model_name: mobilenet_v3_large
# weights: MobileNet_V3_Large_Weights.IMAGENET1K_V2
# output_shape: [68, 2]
# transfer: false
optimizer:
_target_: torch.optim.Adam
_partial_: true
lr: 0.0005
weight_decay: 0
scheduler:
_target_: torch.optim.lr_scheduler.ReduceLROnPlateau
_partial_: true
mode: min
factor: 0.1
patience: 10
# ------------------override configs/data------------------
data:
batch_size: 16
num_workers: 2
pin_memory: false
train_transform:
transforms:
- _target_: albumentations.Resize
height: 256
width: 256
always_apply: true
- _target_: albumentations.Blur
p: 0.5
- _target_: albumentations.RGBShift
r_shift_limit: 50
g_shift_limit: 50
b_shift_limit: 50
p: 0.5
- _target_: albumentations.RandomBrightnessContrast
p: 0.5
- _target_: albumentations.ToGray
p: 0.2
- _target_: albumentations.HueSaturationValue
p: 0.5
- _target_: albumentations.CoarseDropout
num_holes_range: [5, 10]
hole_height_range: [20, 50]
hole_width_range: [20, 50]
fill_value: 0
p: 0.6
- _target_: albumentations.ToFloat
max_value: 255
always_apply: true
- _target_: albumentations.pytorch.transforms.ToTensorV2
val_transform:
transforms:
- _target_: albumentations.Resize
height: 256
width: 256
always_apply: true
- _target_: albumentations.ToFloat
max_value: 255
always_apply: true
- _target_: albumentations.pytorch.transforms.ToTensorV2
# ------------------override configs/logger------------------
logger:
wandb:
_target_: lightning.pytorch.loggers.wandb.WandbLogger
name: "resnet18-more-aug" # name of the run (normally generated by wandb)
save_dir: "${paths.output_dir}"
offline: False
id: null # pass correct id to resume experiment!
anonymous: null # enable anonymous logging
project: "filter"
log_model: True # upload lightning ckpts
prefix: "" # a string to put at the beginning of metric keys
# entity: "" # set to name of your wandb team
group: ""
tags: []
job_type: ""