Example #1
0
int main(){
	Mnist_Parser m;
	m.load_testing();
	m.load_training();
	vec2d_t x;
	vec_t y;
	vec2d_t test_x;
	vec_t test_y;

	for (size_t i = 0; i < 60000; i++){
		x.push_back(m.train_sample[i]->image);
		y.push_back(m.train_sample[i]->label);
	}

	for (size_t i = 0; i < 10000; i++){
		test_x.push_back(m.test_sample[i]->image);
		test_y.push_back(m.test_sample[i]->label);
	}

	LogisticRegression l(x, y);
	l.train();
	l.test(test_x, test_y);
	getchar();
	return 0;
}
Example #2
0
int main(){
	Mnist_Parser m;
	m.load_testing();
	LeNet5* network = new LeNet5();
	std::cout << "start training" << std::endl;
	network -> train(m.test_sample, 60000);
	getchar();
	return 0;
}