Skip to content

Commit

Permalink
fix differential_privacy
Browse files Browse the repository at this point in the history
  • Loading branch information
benmalef committed Nov 22, 2024
1 parent 1a713bb commit 16ea8db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion GANDLF/models/imagenet_unet.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ def __init__(self, parameters) -> None:
)

# all BatchNorm should be replaced with InstanceNorm for DP experiments
if "differential_privacy" in parameters:
if parameters["differential_privacy"] is not None:
self.replace_batchnorm(self.model)

if self.n_dimensions == 3:
Expand Down
2 changes: 1 addition & 1 deletion GANDLF/utils/pydantic_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@ class Parameters(BaseModel):
headers: Optional[dict] = None
output_dir: Optional[str] = ""
problem_type: Optional[str] = None
differential_privacy: Optional[dict] = {}
differential_privacy: Optional[dict] = None
# opt: Optional[Union[dict, str]] = {} # TODO find a better way

0 comments on commit 16ea8db

Please sign in to comment.