NeuralNine / neuralintents

A simple interface for working with intents and chatbots.
MIT License
249 stars 135 forks source link

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. #28

Closed shevy4 closed 1 year ago

shevy4 commented 1 year ago

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

UnknwnDev commented 1 year ago

@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

shevy4 commented 1 year ago

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

wyl20020808 commented 1 year ago

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