8000 run error: ValueError: Incorrect number of features. Got 128 features, expected 384 · Issue #21 · bakwc/PornDetector · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

run error: ValueError: Incorrect number of features. Got 128 features, expected 384 #21

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and 8000 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

Open
michaelzph opened this issue Jun 5, 2020 · 0 comments

Comments

@michaelzph
Copy link
michaelzph commented Jun 5, 2020

when I run the script:

files = ['./00002.jpg']
pcr = PCR()
pcr.loadModel('model.bin')
pred = pcr.predict(files)

error occured. Can you help me?

Traceback (most recent call last):
File "test_case.py", line 16, in
test()
File "test_case.py", line 12, in test
pred = pcr.predict(files)
File "./PornDetector/pcr.py", line 122, in predict
clusters = self._kmeans.predict(totalDescriptors)
File "/home/work/miniconda2/envs/lab_v2/lib/python3.6/site-packages/sklearn/cluster/k_means
.py", line 1358, in predict
X = self.check_test_data(X)
File "/home/work/miniconda2/envs/lab_v2/lib/python3.6/site-packages/sklearn/cluster/k_means
.py", line 704, in _check_test_data
n_features, expected_n_features))
ValueError: Incorrect number of features. Got 128 features, expected 384

@michaelzph michaelzph changed the title run err: IndexError: list index out of range run error: ValueError: Incorrect number of features. Got 128 features, expected 384 Jun 6, 2020
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

1 participant
0