Skip to content

Commit

Permalink
Fix a test expression that has a logical short circuit. (#2046)
Browse files Browse the repository at this point in the history
Comment: Fixed a test expression that has a logical short circuit.

Co-authored-by: rangoliu <[email protected]>
  • Loading branch information
munahaf and liuwenran authored Dec 11, 2023
1 parent 1f4d243 commit 03e24cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mmagic/models/editors/stylegan2/stylegan2_discriminator.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ def __init__(self, in_size, *args, data_aug=None, **kwargs):
augmentation. Defaults to None.
"""
super().__init__(in_size, *args, **kwargs)
self.with_ada = data_aug is not None and data_aug is not dict()
self.with_ada = data_aug is not None and data_aug != dict()
if self.with_ada:
self.ada_aug = MODELS.build(data_aug)
self.ada_aug.requires_grad = False
Expand Down

0 comments on commit 03e24cc

Please sign in to comment.