Giter VIP home page Giter VIP logo

mnistneuralnetwork's Introduction

Convolutional NeuralNetwork using MNIST Data Set

CNN(Convolutional Neural Network)

Check this great explanation out:

https://www.youtube.com/watch?v=KuXjwB4LzSA&t=550s

Convolutional neural networks imitate the structure of neurons that process images in the brain and use techniques to reduce neuron count, as well as maintaining positional relationships in the data.

Convolutional Neural Network

Convolutional Neural Networks (CNNs) are inspired by the structure of neurons in the human brain responsible for processing visual information. They employ techniques to reduce the number of neurons while preserving spatial relationships within the data.

In this project, we've implemented a CNN to work with the MNIST dataset, aiming to recognize handwritten digits and explore different approaches for improved performance.

Using 10 Epochs as a standard base, we are able to achieve 99.25% accurcy in recognizing MNIST images.

Data Preparation

First, we import and prepare the MNIST dataset for our CNN. We reshape the images, normalize the pixel values, and one-hot encode the labels to prepare the data for training.

Creating Your Network

We set up the parameters for our CNN, including the number of epochs for training. We use the Sequential model from Keras to define our network.

Adding Layers

The CNN consists of convolutional layers, pooling layers, dropout layers, and dense layers. Convolutional layers use filters to extract features from the input data. Pooling layers reduce complexity and improve translation invariance. Dropout layers prevent overfitting. Dense layers make the final classification decision.

Compiling the Network

We compile the network using categorical cross-entropy as the loss function, the RMSProp optimizer, and accuracy as the evaluation metric.

Training

We train the model on the MNIST training data, using batch processing and shuffling for better convergence. We monitor the performance on the validation data during training.

Evaluating and Returning the Model

After training, we evaluate the model's performance on the test dataset and print the test accuracy.

Saving your Model

Finally, we save the trained model to a file named 'cnn_model.h5' for future use.

Follow the cnn.ipynb file to train your own CNN.

Credits https://www.tensorflow.org/tutorials/images/cnn https://www.youtube.com/watch?v=KuXjwB4LzSA

mnistneuralnetwork's People

Contributors

sik247 avatar

Stargazers

Frank Liu avatar  avatar Jean Luis Adrover Torres avatar  avatar  avatar

Watchers

Kostas Georgiou avatar  avatar

Forkers

joshuajk7

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.