Git Product home page Git Product logo

cnn_mlp_mnist's Introduction

Introduction

This project includes implementations of Convolutional Neural Networks (CNN) and Multi-Layer Perceptrons (MLP) algorithms for classifying the MNIST dataset. The MNIST dataset consists of 70,000 handwritten digits, which are labeled from 0 to 9. The dataset is commonly used for benchmarking image classification models.

Dependencies

To run the CNN and MLP algorithms, you will need the following dependencies:

Python 3.6+ Pytorch NumPy Matplotlib scikit-learn

Usage

To use the CNN and MLP algorithms, you can follow these steps:

Download the MNIST dataset. Install the dependencies listed above. Clone this repository to your local machine. Open the terminal and navigate to the directory where you cloned the repository. Run python cnn.py to train and test the CNN algorithm, or run python mlp.py to train and test the MLP algorithm. Note that both the CNN and MLP algorithms have default hyperparameters, which you can modify by changing the values in the hyperparameters dictionaries in the cnn.py and mlp.py files. You can also change the number of training epochs and batch size in the same files.

Conclusion

In this project, we have implemented CNN and MLP algorithms for classifying the MNIST dataset. The CNN algorithm outperforms the MLP algorithm in terms of accuracy, but it requires more computational resources and training time. The MLP algorithm is simpler and faster to train, but it may not perform as well as the CNN algorithm on more complex image datasets.

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.