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

第三步的时候出现问题 #1

Open
baoyuxu opened this issue May 24, 2020 · 0 comments
Open

第三步的时候出现问题 #1

baoyuxu opened this issue May 24, 2020 · 0 comments

Comments

@baoyuxu
Copy link

baoyuxu commented May 24, 2020

/root/anaconda3/envs/rcnn/lib/python3.5/site-packages/sklearn/utils/validation.py:395: DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and will raise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.
DeprecationWarning)
Traceback (most recent call last):
File "train_step3.py", line 34, in
Train()
File "train_step3.py", line 20, in init
self._train(self._modelA, self.classA_features, self.classA_labels, "A")
File "train_step3.py", line 24, in _train
model.train(features, labels)
File "/workspace/DL/rcnn/RCNN/models/models.py", line 248, in train
self.clf.fit(features, labels)
File "/root/anaconda3/envs/rcnn/lib/python3.5/site-packages/sklearn/svm/classes.py", line 207, in fit
dtype=np.float64, order="C")
File "/root/anaconda3/envs/rcnn/lib/python3.5/site-packages/sklearn/utils/validation.py", line 521, in check_X_y
ensure_min_features, warn_on_dtype, estimator)
File "/root/anaconda3/envs/rcnn/lib/python3.5/site-packages/sklearn/utils/validation.py", line 424, in check_array
context))
ValueError: Found array with 0 feature(s) (shape=(1, 0)) while a minimum of 1 is required.

我将 File "/workspace/DL/rcnn/RCNN/models/models.py", line 248, in train self.clf.fit(features, labels) 中的features的长度输出,发现长度为0

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