Skip to content

Commit 5419ced

Browse files
committed
increase total batch size per step, and some tweaks
1 parent a58723d commit 5419ced

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

bin/stylegan2_pytorch

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ def train_from_folder(
1515
image_size = 128,
1616
network_capacity = 16,
1717
transparent = False,
18-
batch_size = 3,
19-
gradient_accumulate_every = 5,
18+
batch_size = 5,
19+
gradient_accumulate_every = 6,
2020
num_train_steps = 150000,
2121
learning_rate = 2e-4,
22-
ttur_mult = 2,
22+
ttur_mult = 1.5,
2323
num_workers = None,
2424
save_every = 1000,
2525
generate = False,

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.1',
7+
version = '0.18.2',
88
license='GPLv3+',
99
description = 'StyleGan2 in Pytorch',
1010
author = 'Phil Wang',

stylegan2_pytorch/stylegan2_pytorch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -699,7 +699,7 @@ def train(self):
699699

700700
aug_prob = self.aug_prob
701701

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

0 commit comments

Comments
 (0)