Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small bug in create tower #361

Open
shanuv opened this issue Feb 28, 2024 · 0 comments
Open

Small bug in create tower #361

shanuv opened this issue Feb 28, 2024 · 0 comments

Comments

@shanuv
Copy link

shanuv commented Feb 28, 2024

In lines 70 and 76 of tensorflow_ranking/python/keras/layers.py, the code snippet should have **kwargs as input to tf.keras.layers.Dense

model = tf.keras.Sequential(name=name)
  # Input batch normalization.
  if input_batch_norm:
    model.add(tf.keras.layers.BatchNormalization(momentum=batch_norm_moment))
  for layer_width in hidden_layer_dims:
    model.add(tf.keras.layers.Dense(units=layer_width), **kwargs)
    if use_batch_norm:
      model.add(tf.keras.layers.BatchNormalization(momentum=batch_norm_moment))
    model.add(tf.keras.layers.Activation(activation=activation))
    if dropout:
      model.add(tf.keras.layers.Dropout(rate=dropout))
  model.add(tf.keras.layers.Dense(units=output_units), **kwargs)
  return model

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant