本文整理汇总了C++中Blob::Reshape方法的典型用法代码示例。如果您正苦于以下问题:C++ Blob::Reshape方法的具体用法?C++ Blob::Reshape怎么用?C++ Blob::Reshape使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Blob
的用法示例。
在下文中一共展示了Blob::Reshape方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: filler
void LocalLayer<Dtype>::Forward_cpu(const vector<Blob<Dtype>*>& bottom,
const vector<Blob<Dtype>*>& top) {
Dtype* x_data = col_buffer_.mutable_cpu_data();
const Dtype* weight = this->blobs_[0]->cpu_data();
const Dtype* bottom_data = bottom[0]->cpu_data();
Dtype* top_data = top[0]->mutable_cpu_data();
Blob<Dtype> E;
E.Reshape(1, 1, 1, K_);
FillerParameter filler_param;
filler_param.set_value(1);
ConstantFiller<Dtype> filler(filler_param);
filler.Fill(&E);
Blob<Dtype> intermediate;
intermediate.Reshape(1, 1, K_, N_);
for (int n=0; n<num_; n++) {
im2col_cpu(bottom_data + bottom[0]->offset(n), channels_, height_,
width_, kernel_size_, kernel_size_, pad_, pad_, stride_, stride_, x_data);
for (int m=0; m<num_output_; m++) {
caffe_mul(K_*N_, x_data, weight+this->blobs_[0]->offset(m),
intermediate.mutable_cpu_data());
caffe_cpu_gemm<Dtype>(CblasNoTrans, CblasNoTrans, 1, N_, K_,
(Dtype)1., E.cpu_data(),
intermediate.cpu_data(),
(Dtype)0., top_data + top[0]->offset(n, m));
}
if (bias_term_) {
caffe_add(M_ * N_, this->blobs_[1]->cpu_data(),
top_data + top[0]->offset(n),
top_data + top[0]->offset(n));
}
}
}
示例2: blob_reshape
// Usage: caffe_('blob_reshape', hBlob, new_shape)
static void blob_reshape(MEX_ARGS) {
mxCHECK(nrhs == 2 && mxIsStruct(prhs[0]) && mxIsDouble(prhs[1]),
"Usage: caffe_('blob_reshape', hBlob, new_shape)");
Blob<float>* blob = handle_to_ptr<Blob<float> >(prhs[0]);
const mxArray* mx_shape = prhs[1];
double* shape_mem_mtr = mxGetPr(mx_shape);
const int num_axes = mxGetNumberOfElements(mx_shape);
vector<int> blob_shape(num_axes);
for (int blob_axis = 0, mat_axis = num_axes - 1; blob_axis < num_axes;
++blob_axis, --mat_axis) {
blob_shape[blob_axis] = static_cast<int>(shape_mem_mtr[mat_axis]);
}
blob->Reshape(blob_shape);
}
示例3: read_blob_from_file
static void read_blob_from_file(const std::string& file_name,
Blob<Dtype>& blob) {
std::ifstream file(file_name.c_str(), std::ifstream::binary);
if (file.fail()) {
ASSERT_FALSE(true);
return;
}
vector<int> shape(4, 0);
file.read(reinterpret_cast<char*>(&shape[0]), 4 * sizeof(int));
ASSERT_FALSE(file.fail());
blob.Reshape(shape);
file.read(reinterpret_cast<char*>(blob.mutable_cpu_data()),
blob.count() * sizeof(Dtype));
ASSERT_FALSE(file.fail());
}
示例4: putImage
void CaffeMobile::putImage(AndroidBitmapInfo* info, void* pixels, const vector<Blob<float>*>& resImage) {
Blob<float> * srcBlob = *resImage.data();
LOG(DEBUG) << "srcBlob received";
vector<int> shape = {1, 3, (int) info->width, (int) info->height };
LOG(DEBUG) << "shape configured";
Blob<float>* imgBlob = new Blob<float>();
LOG(DEBUG) << "Blob created";
imgBlob->Reshape(shape);
LOG(DEBUG) << "imgBlob reshaped";
imgBlob->CopyFrom(*srcBlob, false, true);
LOG(DEBUG) << "imgBlob copied";
int size = imgBlob->count();
LOG(DEBUG) << "imgBlob size is: " << size;
/*Partially from https://github.com/ruckus/android-image-filter-ndk*/
uint32_t* pixelRow;
int ix, iy, red, green, blue;
for(iy = 0; iy < (int) info->height; iy++){
pixelRow = (uint32_t*) pixels;
for(ix =0; ix < (int) info->width; ix++){
red = (int) clip(imgBlob->data_at(0,0,iy,ix), 0, 255);
green = (int) clip(imgBlob->data_at(0,1,iy,ix), 0, 255);
blue = (int) clip(imgBlob->data_at(0,2,iy,ix), 0, 255);
pixelRow[ix] =
((red << 16) & 0x00FF0000) |
((green << 8) & 0x0000FF00) |
(blue & 0x000000FF);
}
pixels = (char*)pixels + info->stride;
}
LOG(DEBUG) << "before return putImage " << size;
return;
}
示例5: NumSequenceMatches
int NumSequenceMatches(const TransformationParameter transform_param,
const Datum& datum, Phase phase) {
// Get crop sequence with Caffe seed 1701.
DataTransformer<Dtype>* transformer =
new DataTransformer<Dtype>(transform_param, phase);
const int crop_size = transform_param.crop_size();
int crop_h = transform_param.crop_h();
int crop_w = transform_param.crop_w();
if (crop_size > 0) {
crop_h = crop_w = crop_size;
}
Caffe::set_random_seed(seed_);
transformer->InitRand();
Blob<Dtype>* blob =
new Blob<Dtype>(1, datum.channels(), datum.height(), datum.width());
if (crop_h > 0 || crop_w > 0) {
blob->Reshape(1, datum.channels(), crop_h, crop_w);
}
vector<vector<Dtype> > crop_sequence;
for (int iter = 0; iter < this->num_iter_; ++iter) {
vector<Dtype> iter_crop_sequence;
transformer->Transform(datum, blob);
for (int j = 0; j < blob->count(); ++j) {
iter_crop_sequence.push_back(blob->cpu_data()[j]);
}
crop_sequence.push_back(iter_crop_sequence);
}
// Check if the sequence differs from the previous
int num_sequence_matches = 0;
for (int iter = 0; iter < this->num_iter_; ++iter) {
vector<Dtype> iter_crop_sequence = crop_sequence[iter];
transformer->Transform(datum, blob);
for (int j = 0; j < blob->count(); ++j) {
num_sequence_matches +=
(crop_sequence[iter][j] == blob->cpu_data()[j]);
}
}
return num_sequence_matches;
}
示例6: pred_count
void EvalDetectionLayer<Dtype>::Forward_cpu(
const vector<Blob<Dtype>*>& bottom, const vector<Blob<Dtype>*>& top)
{
//const Dtype* input_data = bottom[0]->cpu_data();// 网络输出 N*13*13*125
const Dtype* label_data = bottom[1]->cpu_data(); // 真实标签数据 N*30*5
//LOG(INFO) << bottom[0]->data_at(0,0,0,0) << " " << bottom[0]->data_at(0,0,0,1);
Blob<Dtype> swap;// 网络输出数据 N * 13* 13* 125
// 变形为 N * (13 * 13) * 5 * 25
// N*(5*(5+num_class_))*13*13 -> N * (13*13) * 5 * (5+num_class_)
swap.Reshape(bottom[0]->num(),
bottom[0]->height()*bottom[0]->width(),
num_object_,
bottom[0]->channels()/num_object_);
Dtype* swap_data = swap.mutable_cpu_data();// cpu上的数据
caffe_set(swap.count(), Dtype(0.0), swap_data);// 设置为0
int index = 0;
for (int b = 0; b < bottom[0]->num(); ++b)// 图片数量
for (int h = 0; h < bottom[0]->height(); ++h) // 格子 13
for (int w = 0; w < bottom[0]->width(); ++w)// 格子 13
for (int c = 0; c < bottom[0]->channels(); ++c)// 5*25=125
{
swap_data[index++] = bottom[0]->data_at(b,c,h,w);
}
//*******************************************************************************//
//caffe_set(swap.count(), Dtype(0.0), swap_data);// 设置为0
//int p_index = (7*13+4)*125;
//swap_data[p_index]=-0.1020;
//swap_data[p_index+1]=2.0867;
//swap_data[p_index+2]=1.612;
//swap_data[p_index+3]=1.0515;
//swap_data[p_index+4]=1.0;
//swap_data[p_index+5+11]=100;
//*******************************************************************************//
Dtype* top_data = top[0]->mutable_cpu_data();// 层输出 cpu数据
caffe_set(top[0]->count(), Dtype(0), top_data);// 设置为0
Dtype all_mAP = 0.0;// 总 batch 的 mAP
for (int i = 0; i < bottom[0]->num(); ++i)
{ // N 图片数量
int input_index = i * bottom[0]->count(1);// 网络输出标签 i * 13*13*125
int true_index = i * bottom[1]->count(1);// 真实标签 i * 30*5
int top_index = i * top[0]->count(1); // 输出数据 // i * ( 20 + 13*13*5*4 + 1) -> i * (13*13*5*4 + 1)
// 前面20个为 真实标签 物体类别出现的次数
// 获取真实边框 =========================================
map<int, vector<BoxData> > gt_boxes;
// 从 对应图片的标签数据中 获取 真实边框 label_ + score_ + box_
// 返回一张图像的 标签 + 多边框数据的 标签
GetGTBox(side_, label_data + true_index, >_boxes);
// 在输出数据中 记录 真实标签 物体类别出现的次数=======================
for (std::map<int, vector<BoxData > >::iterator it = gt_boxes.begin(); it != gt_boxes.end(); ++it)
{
// 遍历 每一个 真实的标签
//int label = it->first;// 标签 类别
vector<BoxData>& g_boxes = it->second;// BoxData: label_ + score_ + box_
for (int j = 0; j < g_boxes.size(); ++j)
{// 边框数量
// 输出数据中的前 20个================================================
// =======================================
// top_data[top_index + label] += 1; // 真实标签 物体类别出现的次数
}
}
// 获取预测边框 =============================================
map<int, vector<BoxData> > pred_boxes;
// 获取预测边框 13*13*5 -> NMS抑制+置信度抑制 -> pred_boxes(数量少很多)
//GetPredBox(side_, num_object_, num_class_, input_data + input_index, &pred_boxes, sqrt_, constriant_, score_type_, nms_);
GetPredBox(side_, num_object_, num_class_, swap_data + input_index, &pred_boxes, score_type_, nms_, biases_);
// 输出数据 后面 的 13*13*5*4 =============================
// int index = top_index + num_class_ + 1;// 20 + 1 之后为 上面的 (label + score + tp + fp) 参数
//=============================
int index = top_index + 1;// 1个 map 之后为 上面的 (label + score + tp + fp) 参数
int pred_count(0);//
Dtype mAP = 0.0;
int pre_clas_num=0;
//float AP = 0.0;
// int tp
// 遍历预测值的 每一类,与最合适的标签边框计算AP,在计算总类别的mAP============
for (std::map<int, vector<BoxData> >::iterator it = pred_boxes.begin(); it != pred_boxes.end(); ++it)
{
Dtype AP = 0.0;// 该类AP
int tp=0;// 预测正确
int fp=0;// 预测错误
++pre_clas_num;// 该图片预测的总类别数量
int label = it->first;// 预测 边框标签
vector<BoxData>& p_boxes = it->second;// 多个边框 vector<BoxData>
// 真实标签中 未找到该 类别=======================================
if (gt_boxes.find(label) == gt_boxes.end()) {
for (int b = 0; b < p_boxes.size(); ++b) {// 该类别下的每一个预测边框
top_data[index + pred_count * 4 + 0] = p_boxes[b].label_;// 标签
top_data[index + pred_count * 4 + 1] = p_boxes[b].score_;// 得分
top_data[index + pred_count * 4 + 2] = 0; //tp
top_data[index + pred_count * 4 + 3] = 1; //fp 错误的预测为正确的
//.........这里部分代码省略.........
示例7: ex_feature
//.........这里部分代码省略.........
Blob<Dtype>* bottom = new Blob<Dtype>(batch_size, 3, crop_size, crop_size);
vector<Blob<Dtype>*> bottomV;
bottomV.push_back(bottom);
int numCaches = ceil(float(images.size()) / batch_size);
Dtype* feature_blob_data;
Dtype* im_blob_ori;
int num=0;
int startIdx = 0;
//bf::path ftrfile = output_path;
//ftrfile.replace_extension(".ftr");
//std::ofstream fo(ftrfile.string().c_str());
bool multivew = false;
LOG(ERROR) << "cachesize:" << batch_size << " numCaches:" << numCaches;
clock_t start_processing, end_processing;
start_processing = clock();
for(int cacheIdx = 0;cacheIdx < numCaches;cacheIdx++){
LOG(ERROR) << "processing:" << cacheIdx << "/" << numCaches;
vector< vector<Dtype> > cache;
//vector< vector<Dtype> > resultcache;
clock_t start_cache, end_cache;
start_cache = clock();
vector<vector<int> > img_size;
readImagesToCache(cache, images, crop_size, mat_mean, batch_size, &startIdx, &num, scale, multivew, img_size);
end_cache = clock();
LOG(ERROR) << "readImageToCache:" << (end_cache-start_cache) << "ms";
start_cache = clock();
int nBatches = ceil(float(cache.size()) / batch_size);
//LOG(ERROR) << "nBatches:"<< nBatches << " cache:" << cache.size();
assert(img_size.size() == nBatches);
for(int batchIdx = 0;batchIdx < nBatches; batchIdx++){
time_t start_epoch, end_epoch;
start_epoch = time(NULL);
LOG(ERROR) << "ResetLayer: height" <<img_size[batchIdx][0] << " width:" << img_size[batchIdx][1] ;
bottom->Reshape(bottom->num(), bottom->channels(), img_size[batchIdx][0], img_size[batchIdx][1]);
feature_extraction_net->ResetLayers(layerIdx, img_size[batchIdx][0], img_size[batchIdx][1]);
int n=readImagesToBlob(*bottom, cache, batch_size, batchIdx);
float loss = 0.0;
LOG(ERROR) << "forward";
const vector<Blob<Dtype>*>& result = feature_extraction_net->Forward(bottomV, layerIdx, &loss);
//SetTopAct<Dtype>(feature_blob);
//int height_t = feature_blob->height();
//int width_t = feature_blob->width();
//LOG(ERROR) << "feature_blob:" << height_t << " " << width_t;
//for(int hh = 0;hh < 3;hh++){
// for(int ww = 0;ww<3;++ww){
//int hh=0, ww=0;
LOG(ERROR) << "Enter coordinate to reconstruct and -1 to processing next picture";
/*while(1){
std::cout << "Input the position to be reconstruct (x y):";
std::cin >> hh;
if (hh == -1){
break;
}
std::cin >> ww;
feature_extraction_net->ReSetActions(layerIdx);
SetTop(feature_blob, hh, ww);
//SetTopAct<Dtype>(feature_blob);
feature_extraction_net->Deconv(layerIdx);
//return 1;
int feature_num = feature_blob->num();
int feature_dim = feature_blob->count() / feature_num;
int start_idx=batch_size*batchIdx;
for(int s=0;s<n;++s){
feature_blob_data = data_blob->mutable_cpu_diff()+data_blob->offset(s);
im_blob_ori = data_blob->mutable_cpu_data() + data_blob->offset(s);
//vector<Dtype> result_t;
示例8: memset
void LocalLayer<Dtype>::Backward_cpu(const vector<Blob<Dtype>*>& top,
const vector<bool>& propagate_down, const vector<Blob<Dtype>*>& bottom) {
const Dtype* top_diff = top[0]->cpu_diff();
const Dtype* bottom_data = bottom[0]->cpu_data();
Dtype* bottom_diff = bottom[0]->mutable_cpu_diff();
Dtype* x_data = col_buffer_.mutable_cpu_data();
Dtype* x_diff = col_buffer_.mutable_cpu_diff();
const Dtype* weight = this->blobs_[0]->cpu_data();
Dtype* weight_diff = this->blobs_[0]->mutable_cpu_diff();
Dtype* bias_diff = NULL;
Blob<Dtype> intermediate;
intermediate.Reshape(1, 1, 1, N_);
Blob<Dtype> xt;
xt.Reshape(1, 1, K_, N_);
Dtype* xt_data = xt.mutable_cpu_data();
if (bias_term_) {
bias_diff = this->blobs_[1]->mutable_cpu_diff();
memset(bias_diff, 0, sizeof(Dtype) * this->blobs_[1]->count());
for (int n = 0; n < num_; ++n) {
caffe_add(M_ * N_, bias_diff,
top_diff + top[0]->offset(n),
bias_diff);
}
}
memset(weight_diff, 0, sizeof(Dtype) * this->blobs_[0]->count());
for (int n=0; n<num_; n++) {
im2col_cpu(bottom_data + bottom[0]->offset(n), channels_, height_,
width_, kernel_size_, kernel_size_, pad_, pad_, stride_, stride_, x_data);
// gradient wrt weight
for (int m=0; m<num_output_; m++) {
Dtype* filter_weight_diff = weight_diff+this->blobs_[0]->offset(m);
for (int k=0; k<K_; k++) {
caffe_mul(N_, top_diff+top[0]->offset(n, m),
x_data+col_buffer_.offset(0,k), xt_data+xt.offset(0,0,k));
}
caffe_cpu_axpby(K_*N_, Dtype(1.0), xt_data, Dtype(1.0), filter_weight_diff);
}
// gradient wrt bottom data
if (propagate_down[0]) {
memset(x_diff, 0, col_buffer_.count() * sizeof(Dtype));
for (int m=0; m<num_output_; m++) {
for (int k=0; k<K_; k++) {
caffe_mul(N_, top_diff+top[0]->offset(n, m),
weight+this->blobs_[0]->offset(m,0,k),
intermediate.mutable_cpu_data());
caffe_cpu_axpby(N_, Dtype(1.0),
intermediate.cpu_data(), Dtype(1.0),
x_diff+col_buffer_.offset(0,k));
}
}
// col2im back to the data
col2im_cpu(x_diff, channels_, height_, width_, kernel_size_, kernel_size_,
pad_, pad_, stride_, stride_, bottom_diff + bottom[0]->offset(n));
}
}
}
示例9: FindOutlier
void FindOutlier( const Dtype* top_diff, const Dtype* bottom_data, int &M, int &N, int &K)
{
if (!ACTIVATE) return;
// ofstream F_top_diff("top_diff.txt");
// ofstream F_bottom_data("bottom_data.txt");
// ofstream F_gradient("gradient.txt");
// ofstream F_mean_gradient("mean_gradient.txt");
// ofstream F_abs_diff("abs_diff.txt");
// for (int i = 0; i<N; i++)
// {
// for (int j = 0; j<M; j++)
// {
// F_top_diff << *(top_diff+i*M+j) << " ";
// }
// F_top_diff << endl;
// }
// F_top_diff.close();
//
// for (int i = 0; i<N; i++)
// {
// for (int j = 0; j<K; j++)
// {
// F_bottom_data << *(bottom_data+i*K+j) << " ";
// }
// F_bottom_data << endl;
// }
// F_bottom_data.close();
if ( !IdentifyOutlier )
{
Blob<Dtype> GradMean;
Blob<Dtype> Grad;
Grad.Reshape( N, 1, M, K);
GradMean.Reshape(1, 1, M, K);
int top_offset = M;
int bottom_offset = K;
int grad_offset = M*K;
Dtype* AllGrad = Grad.mutable_cpu_data();
for (int i = 0; i < N; ++i)
{
caffe_cpu_gemm<Dtype>(CblasTrans, CblasNoTrans, M, K, 1, (Dtype)1.,
top_diff + top_offset * i, bottom_data + bottom_offset * i, (Dtype)0.,
AllGrad + grad_offset * i);
}
// for (int i = 0; i<N; i++)
// {
// for (int j = 0; j<grad_offset; j++)
// {
// F_gradient << *(AllGrad+i*grad_offset+j) << " ";
// }
// F_gradient << endl;
// }
// F_gradient.close();
const Dtype* element_r = Grad.cpu_data();
Dtype* eleMean_w = GradMean.mutable_cpu_data();
caffe_set(grad_offset, (Dtype)0., eleMean_w);
int PositiveNum = 0;
for (int i = 0; i < N; ++i)
{
if (!MiniBatchIsneg[i])
{
caffe_axpy<Dtype>(grad_offset, (Dtype)1., element_r+i*grad_offset, eleMean_w);
PositiveNum ++;
}
}
caffe_scal<Dtype>( grad_offset, (Dtype)(1.0/PositiveNum), eleMean_w);
// for (int i = 0; i<1; i++)
// {
// for (int j = 0; j<grad_offset; j++)
// {
// F_mean_gradient << *(eleMean_w+i*grad_offset+j) << " ";
// }
// F_mean_gradient << endl;
// }
// F_mean_gradient.close();
Dtype* element_w = Grad.mutable_cpu_data();
const Dtype* eleMean_r = GradMean.cpu_data();
for (int i = 0; i < N; ++i)
{
if (!MiniBatchIsneg[i])
{
caffe_axpy<Dtype>(grad_offset, (Dtype)(-1.), eleMean_r, element_w+i*grad_offset);
caffe_abs<Dtype>(grad_offset, Grad.cpu_data() + i * grad_offset, element_w + i*grad_offset);
}
//.........这里部分代码省略.........
示例10: FindOutlier_gpu
void FindOutlier_gpu( const Dtype* top_diff, const Dtype* bottom_data, int &M, int &N, int &K)
{
if (!ACTIVATE) return;
if ( !IdentifyOutlier )
{
Blob<Dtype> GradMean;
Blob<Dtype> Grad;
//LOG(INFO) << "1";
Grad.Reshape( N, 1, M, K);
GradMean.Reshape(1, 1, M, K);
//LOG(INFO) << "2";
int top_offset = M;
int bottom_offset = K;
int grad_offset = M*K;
Dtype* AllGrad = Grad.mutable_gpu_data();
for (int i = 0; i < N; ++i)
{
caffe_gpu_gemm<Dtype>(CblasTrans, CblasNoTrans, M, K, 1, (Dtype)1.,
top_diff + top_offset * i, bottom_data + bottom_offset * i, (Dtype)0.,
AllGrad + grad_offset * i);
}
//LOG(INFO) << "3";
const Dtype* element_r = Grad.gpu_data();
Dtype* eleMean_w = GradMean.mutable_gpu_data();
caffe_gpu_set(grad_offset, (Dtype)0., eleMean_w);
int PositiveNum = 0;
for (int i = 0; i < N; ++i)
{
if (!MiniBatchIsneg[i])
{
caffe_gpu_axpy<Dtype>(grad_offset, (Dtype)1., element_r+i*grad_offset, eleMean_w);
PositiveNum ++;
}
}
caffe_gpu_scal<Dtype>( grad_offset, (Dtype)(1.0/PositiveNum), eleMean_w);
//LOG(INFO) << "4";
Dtype* element_w = Grad.mutable_gpu_data();
const Dtype* eleMean_r = GradMean.gpu_data();
for (int i = 0; i < N; ++i)
{
if (!MiniBatchIsneg[i])
{
caffe_gpu_axpy<Dtype>(grad_offset, (Dtype)(-1.), eleMean_r, element_w+i*grad_offset);
caffe_gpu_abs<Dtype>(grad_offset, Grad.gpu_data() + i * grad_offset, element_w + i*grad_offset);
}
}
//LOG(INFO) << "5";
Blob<Dtype> Ones;
Ones.Reshape( 1, 1, grad_offset, 1);
caffe_gpu_set(grad_offset, (Dtype)1., Ones.mutable_gpu_data());
//LOG(INFO) <<"5.1";
Blob<Dtype> OutIndicator;
OutIndicator.Reshape( N, 1, 1, 1);
caffe_gpu_gemv<Dtype>(CblasNoTrans, N, grad_offset, (Dtype) 1., Grad.gpu_data(), Ones.gpu_data(),
(Dtype)0., OutIndicator.mutable_gpu_data());
//LOG(INFO) <<"5.2";
const Dtype* diff = OutIndicator.cpu_data();
std::vector<mypair> scores;
scores.clear();
for (int i = 0; i < N; ++i)
{
if (!MiniBatchIsneg[i])
{
//LOG(INFO) << i << " " << *(diff+i);
scores.push_back(mypair(*(diff+i), i));
}
}
std::sort(scores.begin(), scores.end(), DataProcess::comparator_pair_index);
//LOG(INFO) <<"5.3";
int KillNumber = (int) (PositiveNum * NoiseRate);
IsOutlier.assign(N, false);
//LOG(INFO) << KillNumber << " " << N <<;
for (int i = 0; i < KillNumber; ++i)
{
IsOutlier[scores[PositiveNum-i-1].second] = true;
Weight[MiniBatchDataID[scores[PositiveNum-i-1].second]]++;
}
//LOG(INFO) << "6";
IdentifyOutlier = true;
}
};