Skip to content

Commit 95f45bc

Browse files
committed
scale residual for disciminator
1 parent 6fb7ef3 commit 95f45bc

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
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.17.7',
7+
version = '0.17.8',
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
@@ -406,7 +406,7 @@ def __init__(self, input_channels, filters, downsample=True):
406406
def forward(self, x):
407407
res = self.conv_res(x)
408408
x = self.net(x)
409-
x = x + res
409+
x = (x + res) * (1 / math.sqrt(2))
410410
if self.downsample is not None:
411411
x = self.downsample(x)
412412
return x

0 commit comments

Comments
 (0)