Skip to content

Commit

Permalink
fix for horizontal flip probability, thanks to @xiankgx
Browse files Browse the repository at this point in the history
  • Loading branch information
lucidrains committed Jul 19, 2022
1 parent e7cbe03 commit 0588213
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
version = __version__,
license='GPLv3+',
description = 'StyleGan2 in Pytorch',
long_description_content_type = 'text/markdown',
author = 'Phil Wang',
author_email = 'lucidrains@gmail.com',
url = 'https://github.com/lucidrains/stylegan2-pytorch',
Expand Down
2 changes: 1 addition & 1 deletion stylegan2_pytorch/stylegan2_pytorch.py
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,7 @@ def __getitem__(self, index):
# augmentations

def random_hflip(tensor, prob):
if prob > random():
if prob < random():
return tensor
return torch.flip(tensor, dims=(3,))

Expand Down
2 changes: 1 addition & 1 deletion stylegan2_pytorch/version.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '1.8.8'
__version__ = '1.8.9'

0 comments on commit 0588213

Please sign in to comment.