From 360cb5e596b945710743153e3b58484b7012a496 Mon Sep 17 00:00:00 2001 From: stefanradev93 Date: Tue, 4 Jun 2024 07:49:09 -0400 Subject: [PATCH] Consistify kwargs --- bayesflow/experimental/networks/resnet/resnet.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bayesflow/experimental/networks/resnet/resnet.py b/bayesflow/experimental/networks/resnet/resnet.py index 4cc46753..a14af038 100644 --- a/bayesflow/experimental/networks/resnet/resnet.py +++ b/bayesflow/experimental/networks/resnet/resnet.py @@ -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 ): """ @@ -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 @@ -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)) @@ -75,7 +75,7 @@ def __init__( bias_regularizer=bias_regularizer, residual=residual, dropout_rate=dropout_rate, - spectral_norm=spectral_norm + spectral_normalization=spectral_normalization ) )