neuralintents icon indicating copy to clipboard operation
neuralintents copied to clipboard

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

Open shevy4 opened this issue 3 years ago • 3 comments

Tensorflow decay has been depreciated since Keras 2.3 hence the chatbot can't be properly instantiated. Screenshot_3

shevy4 avatar Dec 06 '22 02:12 shevy4

@shevy4 I managed to fix this error by changing the optimizer from the new version to legacy If you have a venv set up all you need to do is go to the neuralintents folder go to main and change

from tensorflow.keras.optimizers import SGD to from tensorflow.keras.optimizers.legacy import SGD

UnknwnDev avatar Dec 14 '22 01:12 UnknwnDev

I wasn’t using venv but I followed your steps, simple but invaluable for me, thanks a lot 🙏🏽

shevy4 avatar Dec 14 '22 15:12 shevy4

really help,I changed "from tensorflow.keras.optimizers import Adam" to "from tensorflow.keras.optimizers.legacy import Adam",and it worked. thanks very much

wyl20020808 avatar Jun 07 '23 10:06 wyl20020808