From 02cc6abdbcb194a38686e0c8cf5c21f3c606a41a Mon Sep 17 00:00:00 2001 From: bebeshannu <114089623+bebeshannu@users.noreply.github.com> Date: Sun, 2 Apr 2023 16:59:52 +0530 Subject: [PATCH] Removed deprecated arguments in main.py line 109: Decay argument has been deprecated for all optimizers since Keras 2.3. For lr decay, changed to learning_rate instead. --- neuralintents/main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/neuralintents/main.py b/neuralintents/main.py index 9d24bc2..022388f 100644 --- a/neuralintents/main.py +++ b/neuralintents/main.py @@ -106,7 +106,7 @@ def train_model(self): self.model.add(Dropout(0.5)) self.model.add(Dense(len(train_y[0]), activation='softmax')) - sgd = SGD(lr=0.01, decay=1e-6, momentum=0.9, nesterov=True) + sgd = SGD(learning_rate=0.01, nesterov=True) self.model.compile(loss='categorical_crossentropy', optimizer=sgd, metrics=['accuracy']) self.hist = self.model.fit(np.array(train_x), np.array(train_y), epochs=200, batch_size=5, verbose=1) @@ -184,4 +184,4 @@ def request(self, message): if ints[0]['intent'] in self.intent_methods.keys(): self.intent_methods[ints[0]['intent']]() else: - return self._get_response(ints, self.intents) \ No newline at end of file + return self._get_response(ints, self.intents)