AIWintermuteAI / aXeleRate

Keras-based framework for AI on the Edge
MIT License
174 stars 72 forks source link

Fix for: ValueError: decay is deprecated in the new Keras optimizer #66

Closed damiantomczyszyn closed 4 months ago

damiantomczyszyn commented 4 months ago

Updated the fit method call to the new tensorflow syntax to use the legacy.Adam() method, which takes the old decay parameter.

AIWintermuteAI commented 4 months ago

Thanks! Does using Adam causes error or warning?

damiantomczyszyn commented 4 months ago

Adam causes error in python3.10/dist-packages/keras/src/optimizers/optimizer.py. Specifically /usr/local/lib/python3.10/dist-packages/keras/src/optimizers/optimizer.py in _process_kwargs(self, kwargs) 133 for k in kwargs: 134 if k in legacy_kwargs: --> 135 raise ValueError( 136 f"{k} is deprecated in the new Keras optimizer, please " 137 "check the docstring for valid arguments, or use the "

ValueError: decay is deprecated in the new Keras optimizer, please check the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.Adam.