forked from open-mmlab/mmagic
-
Notifications
You must be signed in to change notification settings - Fork 0
/
biggan_cvt-BigGAN-PyTorch-rgb_imagenet1k-128x128.py
59 lines (55 loc) · 1.48 KB
/
biggan_cvt-BigGAN-PyTorch-rgb_imagenet1k-128x128.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
51
52
53
54
55
56
57
58
59
_base_ = [
'../_base_/datasets/imagenet_noaug_128.py',
'../_base_/gen_default_runtime.py',
]
ema_config = dict(
type='ExponentialMovingAverage',
interval=1,
momentum=0.0001,
update_buffers=True,
start_iter=20000)
model = dict(
type='BigGAN',
num_classes=1000,
data_preprocessor=dict(type='DataPreprocessor'),
ema_config=ema_config,
generator=dict(
type='BigGANGenerator',
output_scale=128,
noise_size=120,
num_classes=1000,
base_channels=96,
shared_dim=128,
with_shared_embedding=True,
sn_eps=1e-6,
act_cfg=dict(type='ReLU', inplace=True),
split_noise=True,
auto_sync_bn=False,
rgb2bgr=True,
init_cfg=dict(type='ortho')),
discriminator=dict(
type='BigGANDiscriminator',
input_scale=128,
num_classes=1000,
base_channels=96,
sn_eps=1e-6,
act_cfg=dict(type='ReLU', inplace=True),
with_spectral_norm=True,
init_cfg=dict(type='ortho')))
train_cfg = train_dataloader = optim_wrapper = None
metrics = [
dict(
type='FrechetInceptionDistance',
prefix='FID-Full-50k',
fake_nums=50000,
inception_style='StyleGAN',
sample_model='ema'),
dict(
type='IS',
prefix='IS-50k',
fake_nums=50000,
inception_style='StyleGAN',
sample_model='ema')
]
val_evaluator = dict(metrics=metrics)
test_evaluator = dict(metrics=metrics)