Skip to content

Commit a58723d

Browse files
committed
wait a bit before doing path length regularization and gradient penalty
1 parent b1365b8 commit a58723d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
name = 'stylegan2_pytorch',
55
packages = find_packages(),
66
scripts=['bin/stylegan2_pytorch'],
7-
version = '0.18.0',
7+
version = '0.18.1',
88
license='GPLv3+',
99
description = 'StyleGan2 in Pytorch',
1010
author = 'Phil Wang',

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -699,8 +699,8 @@ def train(self):
699699

700700
aug_prob = self.aug_prob
701701

702-
apply_gradient_penalty = self.steps % 4 == 0
703-
apply_path_penalty = self.steps % 32 == 0
702+
apply_gradient_penalty = self.steps > 5000 and self.steps % 4 == 0
703+
apply_path_penalty = self.steps > 5000 and self.steps % 32 == 0
704704
apply_cl_reg_to_generated = self.steps > 20000
705705

706706
backwards = partial(loss_backwards, self.fp16)

0 commit comments

Comments
 (0)