Skip to content

Commit 7d0af67

Browse files
committed
make sure contrastive loss reg still works
1 parent 59bc8d4 commit 7d0af67

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.16.0',
7+
version = '0.16.1',
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
@@ -529,7 +529,7 @@ def __init__(self, image_size, latent_dim = 512, style_depth = 8, network_capaci
529529
self.GE = Generator(image_size, latent_dim, network_capacity, transparent = transparent, attn_layers = attn_layers, no_const = no_const)
530530

531531
# experimental contrastive loss discriminator regularization
532-
self.D_cl = None
532+
self.D_cl = ContrastiveLearner(self.D, image_size, hidden_layer='flatten') if cl_reg else None
533533

534534
# wrapper for augmenting all images going into the discriminator
535535
self.D_aug = AugWrapper(self.D, image_size)

0 commit comments

Comments
 (0)