fixed compile warnings from MSVC; fixed warnings in Python bindings; added some debugging code
This commit is contained in:
@@ -220,12 +220,13 @@ public:
|
||||
|
||||
void updateWeightsAndTrim( int treeidx, vector<int>& sidx )
|
||||
{
|
||||
putchar('<');
|
||||
int i, n = (int)w->sidx.size();
|
||||
int nvars = (int)varIdx.size();
|
||||
double sumw = 0., C = 1.;
|
||||
cv::AutoBuffer<double> buf(n*3 + nvars);
|
||||
cv::AutoBuffer<double> buf(n + nvars);
|
||||
double* result = buf;
|
||||
float* sbuf = (float*)(result + n*3);
|
||||
float* sbuf = (float*)(result + n);
|
||||
Mat sample(1, nvars, CV_32F, sbuf);
|
||||
int predictFlags = bparams.boostType == Boost::DISCRETE ? (PREDICT_MAX_VOTE | RAW_OUTPUT) : PREDICT_SUM;
|
||||
predictFlags |= COMPRESSED_INPUT;
|
||||
@@ -373,6 +374,7 @@ public:
|
||||
if( w->sample_weights[si] >= threshold )
|
||||
sidx.push_back(si);
|
||||
}
|
||||
putchar('>'); fflush(stdout);
|
||||
}
|
||||
|
||||
float predictTrees( const Range& range, const Mat& sample, int flags0 ) const
|
||||
|
Reference in New Issue
Block a user