Skip to content

Commit

Permalink
Fix deprecated AlphaDropout layer, seed=... was in wrong place (#20326)
Browse files Browse the repository at this point in the history
  • Loading branch information
ageron authored Oct 5, 2024
1 parent 5aa5f88 commit b083f2e
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions keras/src/legacy/layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,8 @@ def call(self, inputs, training=False):
else:
noise_shape = self.noise_shape
kept_idx = tf.greater_equal(
backend.random.uniform(noise_shape),
backend.random.uniform(noise_shape, seed=self.seed_generator),
self.rate,
seed=self.seed_generator,
)
kept_idx = tf.cast(kept_idx, inputs.dtype)

Expand Down

0 comments on commit b083f2e

Please sign in to comment.