forked from open-mmlab/mmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stylegan3-t_cvt-official-rgb_8xb4_ffhq-1024x1024.py
50 lines (42 loc) · 1.29 KB
/
stylegan3-t_cvt-official-rgb_8xb4_ffhq-1024x1024.py
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
_base_ = [
'../_base_/models/base_styleganv3.py',
'../_base_/gen_default_runtime.py',
'../_base_/datasets/ffhq_flip.py',
]
synthesis_cfg = {
'type': 'SynthesisNetwork',
'channel_base': 32768,
'channel_max': 512,
'magnitude_ema_beta': 0.999
}
model = dict(
generator=dict(
out_size=1024,
img_channels=3,
synthesis_cfg=synthesis_cfg,
rgb2bgr=True),
discriminator=dict(in_size=1024))
batch_size = 4
data_root = './data/ffhq/images'
train_dataloader = dict(
batch_size=batch_size, dataset=dict(data_root=data_root))
val_dataloader = dict(batch_size=batch_size, dataset=dict(data_root=data_root))
test_dataloader = dict(
batch_size=batch_size, dataset=dict(data_root=data_root))
train_cfg = train_dataloader = optim_wrapper = None
metrics = [
dict(
type='FrechetInceptionDistance',
prefix='FID-Full-50k',
fake_nums=50000,
inception_style='StyleGAN',
sample_model='ema')
]
# NOTE: config for save multi best checkpoints
# default_hooks = dict(
# checkpoint=dict(
# save_best=['FID-Full-50k/fid', 'IS-50k/is'],
# rule=['less', 'greater']))
default_hooks = dict(checkpoint=dict(save_best='FID-Full-50k/fid'))
val_evaluator = dict(metrics=metrics)
test_evaluator = dict(metrics=metrics)