https://github.com/4dajkong/keras_lenet-5_model

A simple CNN model based on Keras API

https://github.com/4dajkong/keras_lenet-5_model

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (6.7%) to scientific vocabulary
Last synced: 10 months ago · JSON representation

Repository

A simple CNN model based on Keras API

Basic Info
  • Host: GitHub
  • Owner: 4daJKong
  • Language: Python
  • Default Branch: main
  • Size: 762 KB
Statistics
  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • Open Issues: 0
  • Releases: 0
Created over 4 years ago · Last pushed over 4 years ago
Metadata Files
Readme

README.md

KerasLeNet-5model

A simple CNN model based on Keras API

Introduction

I followed and implemented the LeNet-5 CNN architecture by Keras API, then trained the model by MNIST dataset. The test loss is 0.035 and the test accuracy is 0.989 after evaluating.(For more specific training and testing process, it is on 2DCNNMNISTdigit.py) After that, I serach some digits verification code on the internet and decide to get further result on the performance of my model. Unfortunately, the performance is not good. I guess the main problem is the difference between MNIST and other digits in their art styles.

The architecture and parameters of LeNet-5 CNN

lenet-5_arch


Layer (type) | Output Shape | Param # |-------- | :-----------: | :-----------: | conv2d (Conv2D) | (None, 28, 28, 6) | 156 averagepooling2d (AveragePooling2D) | (None, 14, 14, 6)| 0 conv2d1 (Conv2D) | (None, 10, 10, 16) | 2416 averagepooling2d1 (Averag ePooling2D) | (None, 5, 5, 16) | 0 flatten (Flatten) | (None, 400) | 0 dense (Dense) | (None, 120) | 48120 dense1 (Dense) | (None, 84) | 10164 dense2 (Dense) | (None, 10) | 850


Total params: 61,706
Trainable params: 61,706
Non-trainable params: 0


MNIST handwritten digit dataset

MNIST

The prediction result of digit verification code by Lenet-5 model

predict_digit

Requirements:

| Software | Version | | ------------- | ------------- | | Python | 3.9.9 | | Numpy | 1.21.4 | | tensorflow | 2.7.0 | | keras | 2.7.0 | | matplotlib | 3.5.0 |

Citation:

Y. Lecun, L. Bottou, Y. Bengio and P. Haffner, "Gradient-based learning applied to document recognition," in Proceedings of the IEEE, vol. 86, no. 11, pp. 2278-2324, Nov. 1998, doi: 10.1109/5.726791.

Owner

  • Name: ZY.Li
  • Login: 4daJKong
  • Kind: user

GitHub Events

Total
Last Year