The purpose of this code is to help beginners understand the programming details of CNNs
This code is the main function that you can run this network. I also provided a trained network in Accuracy_Calculation.m and you can run that code to calculate the train_set or test_set's accuracy.
I mainly refer to Andrew Ng's deeplearning.ai and some online blogs(https://www.cnblogs.com/pinard/p/6494810.html)
If you have any question or find any mistake in this code, please do not hesitate to contact me immediately (peng_sun0819@163.com)
Cite As
Peng Sun (2026). LetNet-5 CNN (https://www.mathworks.com/matlabcentral/fileexchange/104135-letnet-5-cnn), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2021b
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
