Skip to content

Commit

Permalink
Update location of legacy optimizers.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 522627744
  • Loading branch information
Responsible ML Infra authored and Responsible ML Infra Team committed Apr 7, 2023
1 parent 2cb99e9 commit 614e1c9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion g3doc/tutorials/Fairness_Indicators_Example_Colab.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@
" hidden_units=[500, 100],\n",
" weight_column='weight',\n",
" feature_columns=[embedded_text_feature_column],\n",
" optimizer=tf.keras.optimizers.Adagrad(learning_rate=0.003),\n",
" optimizer=tf.keras.optimizers.legacy.Adagrad(learning_rate=0.003),\n",
" loss_reduction=tf.losses.Reduction.SUM,\n",
" n_classes=2,\n",
" model_dir=model_dir)\n",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -819,8 +819,8 @@
"# Create constrained optimizer and obtain train_op.\n",
"# Separate optimizers are specified for the objective and constraints\n",
"optimizer = tfco.ProxyLagrangianOptimizerV2(\n",
" optimizer=tf.keras.optimizers.Adam(learning_rate=0.001),\n",
" constraint_optimizer=tf.keras.optimizers.Adam(learning_rate=0.001),\n",
" optimizer=tf.keras.optimizers.legacy.Adam(learning_rate=0.001),\n",
" constraint_optimizer=tf.keras.optimizers.legacy.Adam(learning_rate=0.001),\n",
" num_constraints=problem.num_constraints)\n",
"\n",
"# A list of all trainable variables is also needed to use TFCO.\n",
Expand Down

0 comments on commit 614e1c9

Please sign in to comment.