Skip to content

Commit

Permalink
Consistify kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanradev93 committed Jun 4, 2024
1 parent e65cd94 commit 360cb5e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bayesflow/experimental/networks/resnet/resnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def __init__(
kernel_initializer: str = "he_uniform",
residual: bool = True,
dropout_rate: float = 0.05,
spectral_norm: bool = False,
spectral_normalization: bool = False,
**kwargs
):
"""
Expand All @@ -44,7 +44,7 @@ def __init__(
The activation function of the dense layers
residual : bool, optional, default: True
Use residual connections in the internal layers.
spectral_norm : bool, optional, default: False
spectral_normalization : bool, optional, default: False
Use spectral normalization for the network weights, which can make
the learned function smoother and hence more robust to perturbations.
dropout_rate : float, optional, default: 0.05
Expand All @@ -60,7 +60,7 @@ def __init__(
kernel_initializer=kernel_initializer,
bias_regularizer=bias_regularizer,
)
if spectral_norm:
if spectral_normalization:
projector = layers.SpectralNormalization(projector)
self.res_blocks.add(projector)
self.res_blocks.add(layers.Dropout(dropout_rate))
Expand All @@ -75,7 +75,7 @@ def __init__(
bias_regularizer=bias_regularizer,
residual=residual,
dropout_rate=dropout_rate,
spectral_norm=spectral_norm
spectral_normalization=spectral_normalization
)
)

Expand Down

0 comments on commit 360cb5e

Please sign in to comment.