标签:
// write the predicted score into txt files
ofstream file("/home/wangxiao/Downloads/caffe-master/wangxiao/bvlc_alexnet/predict_score.txt",ios::app);
if(!file) return;
static int nu = 0;
if(nu < 35){
file << bottom_data[id_tmp] << " " ;
nu ++;
} else {
nu = 0;
file << " " << endl; // endl denotes change into next line in the C++ language
}
file.close();
C++ code: 将程序的输出,保存到txt文档中,且每35个数,自动换行
标签:
原文地址:http://www.cnblogs.com/wangxiaocvpr/p/5258724.html