Skip to content

Commit

Permalink
make sure contrastive loss regularization and transparent images are …
Browse files Browse the repository at this point in the history
…not both turned on
  • Loading branch information
lucidrains committed Jun 27, 2020
1 parent 7d0af67 commit c74e436
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
name = 'stylegan2_pytorch',
packages = find_packages(),
scripts=['bin/stylegan2_pytorch'],
version = '0.16.1',
version = '0.16.2',
license='GPLv3+',
description = 'StyleGan2 in Pytorch',
author = 'Phil Wang',
Expand Down
1 change: 1 addition & 0 deletions stylegan2_pytorch/stylegan2_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ def __init__(self, image_size, latent_dim = 512, style_depth = 8, network_capaci
self.GE = Generator(image_size, latent_dim, network_capacity, transparent = transparent, attn_layers = attn_layers, no_const = no_const)

# experimental contrastive loss discriminator regularization
assert not (transparent and cl_reg), 'contrastive loss regularization does not work with transparent images yet'
self.D_cl = ContrastiveLearner(self.D, image_size, hidden_layer='flatten') if cl_reg else None

# wrapper for augmenting all images going into the discriminator
Expand Down

0 comments on commit c74e436

Please sign in to comment.