Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
alpha_initializer=rank1_utils.make_initializer(
alpha_initializer, random_sign_init, dropout_rate),
gamma_initializer=rank1_utils.make_initializer(
gamma_initializer, random_sign_init, dropout_rate),
kernel_initializer="he_normal",
alpha_regularizer=rank1_utils.make_regularizer(
alpha_regularizer, prior_mean, prior_stddev),
gamma_regularizer=rank1_utils.make_regularizer(
gamma_regularizer, prior_mean, prior_stddev),
kernel_regularizer=tf.keras.regularizers.l2(l2),
bias_regularizer=tf.keras.regularizers.l2(l2),
use_additive_perturbation=use_additive_perturbation,
ensemble_size=ensemble_size)
# 3. Output affine layer.
self.output_layer = rank1_bnn_layers.DenseRank1(
output_layer_dim,
alpha_initializer=rank1_utils.make_initializer(
alpha_initializer, random_sign_init, dropout_rate),
gamma_initializer=rank1_utils.make_initializer(
gamma_initializer, random_sign_init, dropout_rate),
kernel_initializer="he_normal",
alpha_regularizer=rank1_utils.make_regularizer(
alpha_regularizer, prior_mean, prior_stddev),
gamma_regularizer=rank1_utils.make_regularizer(
gamma_regularizer, prior_mean, prior_stddev),
kernel_regularizer=tf.keras.regularizers.l2(l2),
bias_regularizer=tf.keras.regularizers.l2(l2),
use_additive_perturbation=use_additive_perturbation,
ensemble_size=ensemble_size)