mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Partially back-port #25075 to 4.x
This commit is contained in:
@@ -375,7 +375,7 @@ bool SVMSGDImpl::isTrained() const
|
||||
void SVMSGDImpl::write(FileStorage& fs) const
|
||||
{
|
||||
if( !isTrained() )
|
||||
CV_Error( CV_StsParseError, "SVMSGD model data is invalid, it hasn't been trained" );
|
||||
CV_Error( cv::Error::StsParseError, "SVMSGD model data is invalid, it hasn't been trained" );
|
||||
|
||||
writeFormat(fs);
|
||||
writeParams( fs );
|
||||
@@ -437,7 +437,7 @@ void SVMSGDImpl::readParams( const FileNode& fn )
|
||||
svmsgdTypeStr == "ASGD" ? ASGD : -1;
|
||||
|
||||
if( svmsgdType < 0 )
|
||||
CV_Error( CV_StsParseError, "Missing or invalid SVMSGD type" );
|
||||
CV_Error( cv::Error::StsParseError, "Missing or invalid SVMSGD type" );
|
||||
|
||||
params.svmsgdType = svmsgdType;
|
||||
|
||||
@@ -447,7 +447,7 @@ void SVMSGDImpl::readParams( const FileNode& fn )
|
||||
marginTypeStr == "HARD_MARGIN" ? HARD_MARGIN : -1;
|
||||
|
||||
if( marginType < 0 )
|
||||
CV_Error( CV_StsParseError, "Missing or invalid margin type" );
|
||||
CV_Error( cv::Error::StsParseError, "Missing or invalid margin type" );
|
||||
|
||||
params.marginType = marginType;
|
||||
|
||||
@@ -517,7 +517,7 @@ void SVMSGDImpl::setOptimalParameters(int svmsgdType, int marginType)
|
||||
break;
|
||||
|
||||
default:
|
||||
CV_Error( CV_StsParseError, "SVMSGD model data is invalid" );
|
||||
CV_Error( cv::Error::StsParseError, "SVMSGD model data is invalid" );
|
||||
}
|
||||
}
|
||||
} //ml
|
||||
|
||||
Reference in New Issue
Block a user