Skip to content

Commit 89fd0f5

Browse files
Tomer Kaftantensorflower-gardener
authored andcommitted
Remove temporary monitoring now that underlying perf issue is resolved
PiperOrigin-RevId: 398533606
1 parent 8aecb5f commit 89fd0f5

File tree

1 file changed

+0
-11
lines changed

1 file changed

+0
-11
lines changed

keras/layers/core/dropout.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,6 @@
2121
import tensorflow.compat.v2 as tf
2222
from tensorflow.python.util.tf_export import keras_export
2323

24-
# TODO(b/168039935): track dropout rate to decide whether/how to make a
25-
# dropout rate fastpath.
26-
keras_temporary_dropout_rate = tf.__internal__.monitoring.BoolGauge(
27-
'/tensorflow/api/keras/dropout/temp_rate_is_zero',
28-
'Temporarily record if Keras dropout layer was created w/'
29-
'constant rate = 0')
30-
3124

3225
@keras_export('keras.layers.Dropout')
3326
class Dropout(Layer):
@@ -87,10 +80,6 @@ def __init__(self, rate, noise_shape=None, seed=None, **kwargs):
8780
raise ValueError(f'Invalid value {rate} received for '
8881
f'`rate`, expected a value between 0 and 1.')
8982
self.rate = rate
90-
if isinstance(rate, (int, float)) and not rate:
91-
keras_temporary_dropout_rate.get_cell().set(True)
92-
else:
93-
keras_temporary_dropout_rate.get_cell().set(False)
9483
self.noise_shape = noise_shape
9584
self.seed = seed
9685
self.supports_masking = True

0 commit comments

Comments
 (0)