为什么我在调用find_cars()时收到此错误

时间:2019-03-06 16:17:39

标签: python machine-learning svm object-detection image-preprocessing

ValueError:预期的2D数组,取而代之的是1D数组: 数组= [0.05760078 0.02291208 0.01819267 ... 0.02739229 0.01199168 0.00890131]。 如果数据具有单个功能,则使用array.reshape(-1,1)来重塑数据;如果包含单个样本,则使用array.reshape(1,-1)来重塑数据。

任何快速解决方案都可以为我提供很多帮助。 这是代码:

return new DatePickerDialog(getActivity(), (DatePickerDialog.OnDateSetListener) getParentFragment(), year, month, day);

1 个答案:

答案 0 :(得分:0)

您确定不应该向函数传递值列表吗?

find_cars([test_img, ystart, ystop, scale, colorspace, hog_channel, svc, None, orient, pix_per_cell, cell_per_block, None, None])