<commit_before>#include "CaffeBatchPrediction.hpp"
#include "classifierio.hpp"

using namespace std;
using namespace cv;

int main(int argc, char **argv)
{
	::google::InitGoogleLogging(argv[0]);
	if (argc < 2)
	{
		cout << "Usage : " << argv[0] << " filelist_of_imgs.txt" << endl;
		return 1;
	}
	ClassifierIO clio("d24", 5, -1);
	vector<string> files = clio.getClassifierFiles();
	for (auto it = files.cbegin(); it != files.cend(); ++it)
		cout << *it << endl;

	ifstream infile(argv[1]);

	CaffeClassifier<Mat> c(files[0], files[1], files[2], files[3], 256); 

	Mat img;
	Mat rsz;
	Mat f32;
	vector<Mat> imgs;
	string filename;
	while(getline(infile, filename))
	{
		cout << "Read " << filename << endl;
		img = imread(filename);
		resize(img, rsz, c.getInputGeometry()); 
		rsz.convertTo(f32, CV_32FC3, 1/255.);
		imgs.push_back(f32.clone());
	}

	while (clio.findNextClassifierStage(false))
	{


	vector<string> files = clio.getClassifierFiles();
	CaffeClassifier<Mat> c(files[0], files[1], files[2], files[3], 256); 
	vector<vector<Prediction>> p = c.ClassifyBatch(imgs,2);
	for (auto v = p.cbegin(); v != p.cend(); ++v)
	{
		for (auto it = v->cbegin(); it != v->cend(); ++it)
			cout << it->first << " " << it->second << " ";
		cout << endl;
	}
	cout <<"---------------------"<< endl;
	}

	
	return 0;

}<commit_msg>Updates to print all epochs<commit_after>#include "CaffeBatchPrediction.hpp"
#include "classifierio.hpp"

using namespace std;
using namespace cv;

int main(int argc, char **argv)
{
	::google::InitGoogleLogging(argv[0]);
	if (argc < 2)
	{
		cout << "Usage : " << argv[0] << " filelist_of_imgs.txt" << endl;
		return 1;
	}
	ClassifierIO clio("d24", 5, -1);
	vector<string> files = clio.getClassifierFiles();
	for (auto it = files.cbegin(); it != files.cend(); ++it)
		cout << *it << endl;

	ifstream infile(argv[1]);

	CaffeClassifier<Mat> c(files[0], files[1], files[2], files[3], 256); 

	Mat img;
	Mat rsz;
	Mat f32;
	vector<Mat> imgs;
	string filename;
	while(getline(infile, filename))
	{
		cout << "Read " << filename << endl;
		img = imread(filename);
		resize(img, rsz, c.getInputGeometry()); 
		rsz.convertTo(f32, CV_32FC3, 1/255.);
		imgs.push_back(f32.clone());
	}

	while (clio.findNextClassifierStage(false))
	{
		vector<string> files = clio.getClassifierFiles();
		CaffeClassifier<Mat> c(files[0], files[1], files[2], files[3], 256); 
		vector<vector<Prediction>> p = c.ClassifyBatch(imgs,2);
		for (auto v = p.cbegin(); v != p.cend(); ++v)
		{
			for (auto it = v->cbegin(); it != v->cend(); ++it)
				cout << it->first << " " << it->second << " ";
			cout << endl;
		}
		cout <<"---------------------"<< endl;
	}


	return 0;

}
{'fraction_non_alphanumeric': 0.21313320825515947, 'fraction_numerical': 0.02851782363977486, 'mean_word_length': 3.918819188191882, 'pattern_counts': {'":': 0, '<': 83, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1179737', 'n_tokens_mistral': 1130, 'n_tokens_neox': 1039, 'n_words': 230}