juntang-zhuang / Adabelief-Optimizer

Repository for NeurIPS 2020 Spotlight "AdaBelief Optimizer: Adapting stepsizes by the belief in observed gradients"
BSD 2-Clause "Simplified" License
1.05k stars 109 forks source link

adapt to Tensorflow >= 2.11 #68

Open bertsky opened 2 months ago

bertsky commented 2 months ago

As of TF 2.11, Optimizer must be imported from tf.keras.optimizers.legacy instead of tf.keras.optimizers.

I have tested with TF 2.13.1 on AdaBelief_tf2_test.py from the 0.3.0 branch (with a slight modification of the assertion to ignore extra config details).

If you believe I should rebase on the 0.3.0 branch, please let me know. (That changeset looks broken to me – it includes lots of compilation and cache results.)