FlexNN 1
Fully connected neural network built from scratch with flexible n-layer design and multiple activations.
Loading...
Searching...
No Matches
main.cpp File Reference

Main file for the MNIST digit recognition example using FlexNN. More...

#include <iostream>
#include <vector>
#include <Eigen/Dense>
#include "FlexNN.h"
#include "Utility.h"
Include dependency graph for main.cpp:

Functions

int main ()
 Main function to demonstrate a simple neural network for MNIST digit recognition.
 

Detailed Description

Main file for the MNIST digit recognition example using FlexNN.

This file demonstrates how to use the FlexNN library to create, train, and evaluate a neural network for recognizing handwritten digits from the MNIST dataset. It includes reading the dataset from a CSV file, normalizing the data, splitting it into training and test sets, defining the neural network architecture, training the network, and evaluating its performance. The user can also test the model with specific indices from the test set to see the predicted and actual labels, along with an ASCII representation of the image.

Function Documentation

◆ main()

int main ( )

Main function to demonstrate a simple neural network for MNIST digit recognition.

This program reads the MNIST dataset from a CSV file, normalizes the data, splits it into training and test sets, creates a neural network with two layers, trains the network on the training data, and evaluates its accuracy on both training and test sets. It also allows the user to input an index to test the model's prediction on a specific sample from the test set. The predicted label and actual label are displayed, along with an ASCII representation of the image.