mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 07:13:02 +04:00
ml: add checks of empty train data
This commit is contained in:
@@ -230,6 +230,7 @@ float SVMSGDImpl::calcShift(InputArray _samples, InputArray _responses) const
|
||||
|
||||
bool SVMSGDImpl::train(const Ptr<TrainData>& data, int)
|
||||
{
|
||||
CV_Assert(!data.empty());
|
||||
clear();
|
||||
CV_Assert( isClassifier() ); //toDo: consider
|
||||
|
||||
|
||||
Reference in New Issue
Block a user