dataset_type = 'UnconditionalImageDataset' train_pipeline = [ dict(type='LoadImageFromFile', key='real_img', io_backend='disk'), dict(type='Resize', keys=['real_img'], scale=(256, 256)), dict(type='Flip', keys=['real_img'], direction='horizontal'), dict( type='Normalize', keys=['real_img'], mean=[127.5, 127.5, 127.5], std=[127.5, 127.5, 127.5], to_rgb=False), dict(type='ImageToTensor', keys=['real_img']), dict(type='Collect', keys=['real_img'], meta_keys=['real_img_path']) ] data = dict( samples_per_gpu=4, workers_per_gpu=4, train=dict( type='UnconditionalImageDataset', imgs_root='./data/polyp/masked', pipeline=[ dict(type='LoadImageFromFile', key='real_img', io_backend='disk'), dict(type='Resize', keys=['real_img'], scale=(256, 256)), dict(type='Flip', keys=['real_img'], direction='horizontal'), dict( type='Normalize', keys=['real_img'], mean=[127.5, 127.5, 127.5], std=[127.5, 127.5, 127.5], to_rgb=False), dict(type='ImageToTensor', keys=['real_img']), dict( type='Collect', keys=['real_img'], meta_keys=['real_img_path']) ])) d_reg_interval = 16 g_reg_interval = 4 g_reg_ratio = 0.8 d_reg_ratio = 0.9411764705882353 model = dict( type='StaticUnconditionalGAN', generator=dict( type='StyleGANv2Generator', out_size=128, style_channels=512), discriminator=dict(type='StyleGAN2Discriminator', in_size=128), gan_loss=dict(type='GANLoss', gan_type='wgan-logistic-ns'), disc_auxiliary_loss=dict( type='R1GradientPenalty', loss_weight=80.0, interval=16, norm_mode='HWC', data_info=dict(real_data='real_imgs', discriminator='disc')), gen_auxiliary_loss=dict( type='GeneratorPathRegularizer', loss_weight=8.0, pl_batch_shrink=2, interval=4, data_info=dict(generator='gen', num_batches='batch_size'))) train_cfg = dict(use_ema=True) test_cfg = None optimizer = dict( generator=dict(type='Adam', lr=0.0016, betas=(0, 0.9919919678228657)), discriminator=dict( type='Adam', lr=0.0018823529411764706, betas=(0, 0.9905854573074332))) checkpoint_config = dict(interval=1000, by_epoch=False, max_keep_ckpts=30) log_config = dict(interval=100, hooks=[dict(type='TextLoggerHook')]) custom_hooks = [ dict( type='VisualizeUnconditionalSamples', output_dir='training_samples', interval=5000), dict(type='PGGANFetchDataHook', interval=1), dict( type='ExponentialMovingAverageHook', module_keys=('generator_ema', ), interval=1, priority='VERY_HIGH') ] runner = dict( type='DynamicIterBasedRunner', is_dynamic_ddp=True, pass_training_status=True) dist_params = dict(backend='nccl') log_level = 'INFO' load_from = None resume_from = None workflow = [('train', 10000)] find_unused_parameters = True cudnn_benchmark = True metrics = dict( fid50k=dict( type='FID', num_images=50000, inception_pkl='work_dirs/inception_pkl/polyp.pkl', bgr2rgb=True), pr50k3=dict(type='PR', num_images=50000, k=3), is50k=dict(type='IS', num_images=50000), ppl_zfull=dict(type='PPL', space='Z', sampling='full', num_images=50000), ppl_wfull=dict(type='PPL', space='W', sampling='full', num_images=50000), ppl_zend=dict(type='PPL', space='Z', sampling='end', num_images=50000), ppl_wend=dict(type='PPL', space='W', sampling='end', num_images=50000), ms_ssim10k=dict(type='MS_SSIM', num_images=10000), swd16k=dict(type='SWD', num_images=16384)) ema_half_life = 10.0 lr_config = None total_iters = 8000 work_dir = './work_dirs/polyp' gpu_ids = range(0, 1)