Skip to content

Commit 504f5a4

Browse files
Code changes to get ready for an incoming Keras optimizer migration.
PiperOrigin-RevId: 475356875
1 parent ae0a1f5 commit 504f5a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tensorflow_probability/python/layers/weight_norm_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,9 +225,9 @@ def testGradientValues(self, model_type):
225225
@parameterized.parameters(['sequential', 'sequential_no_input', 'functional'])
226226
def testTrainableVariableInitializationInModelFit(self, model_type):
227227
if tf.__internal__.tf2.enabled() and tf.executing_eagerly():
228-
sgd = tf.keras.optimizers.SGD(lr=0.)
228+
sgd = tf.keras.optimizers.SGD(learning_rate=0.)
229229
else:
230-
sgd = tf.keras.optimizers.legacy.SGD(lr=0.)
230+
sgd = tf.keras.optimizers.legacy.SGD(learning_rate=0.)
231231
model = self._define_model(model_type, self.data_dim, self.num_hidden)
232232
model.compile(optimizer=sgd, loss='mse')
233233
model.fit(

0 commit comments

Comments
 (0)