Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
malpraku opened this issue Jul 23, 2023 · 0 comments
Open

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

malpraku opened this issue Jul 23, 2023 · 0 comments
Assignees

Comments

@malpraku
Copy link

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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants