alessiosavi / PyRecognizer

"A neural network to rule them all, a neural network to find them, a neural network to bring them all and verify if is you !!" (Face recognition tool)
MIT License
35 stars 14 forks source link

AttributeError: 'MLPClassifier' object has no attribute 'max_fun' #256

Open malpraku opened 1 year ago

malpraku commented 1 year ago

I don't know what I did wrong. I do install the modules in requirements.txt.

Traceback (most recent call last):
  File "/home/valliansecurity/.local/lib/python3.8/site-packages/flask/app.py", line 2525, in wsgi_app
    response = self.full_dispatch_request()
  File "/home/valliansecurity/.local/lib/python3.8/site-packages/flask/app.py", line 1822, in full_dispatch_request
    rv = self.handle_user_exception(e)
  File "/home/valliansecurity/.local/lib/python3.8/site-packages/flask/app.py", line 1820, in full_dispatch_request
    rv = self.dispatch_request()
  File "/home/valliansecurity/.local/lib/python3.8/site-packages/flask/app.py", line 1796, in dispatch_request
    return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
  File "main.py", line 146, in train_http
    return jsonify(train_network(TMP_UPLOAD_TRAINING, file, clf, DETECTION_MODEL, JITTER, ENCODING_MODELS))
  File "/home/valliansecurity/PyRecognizer/api/Api.py", line 112, in train_network
    neural_model_file, _ = clf.train(dataset["X"], dataset["Y"], timestamp)
  File "/home/valliansecurity/PyRecognizer/datastructure/Classifier.py", line 118, in train
    self.classifier.fit(X_train, Y_train)
  File "/usr/lib/python3.8/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 1027, in fit
    return self._fit(X, y, incremental=(self.warm_start and
  File "/usr/lib/python3.8/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 321, in _fit
    self._validate_hyperparameters()
  File "/usr/lib/python3.8/site-packages/sklearn/neural_network/_multilayer_perceptron.py", line 385, in _validate_hyperparameters
    if self.max_fun <= 0:
AttributeError: 'MLPClassifier' object has no attribute 'max_fun'