{"id":19012512,"url":"https://github.com/rkc007/digit-recognizer-using-ffnn","last_synced_at":"2026-05-16T17:10:04.115Z","repository":{"id":84780795,"uuid":"257038921","full_name":"rkc007/Digit-Recognizer-Using-FFNN","owner":"rkc007","description":"A feed forward neural network (FFNN) is built to recognize the gray-scale images of hand-drawn digits from zero through nine using tensorflow.","archived":false,"fork":false,"pushed_at":"2020-12-25T04:53:15.000Z","size":209,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-21T15:54:08.428Z","etag":null,"topics":["feedforward-neural-network","machine-learning","neural-network","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rkc007.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-04-19T15:48:51.000Z","updated_at":"2023-03-08T01:09:23.000Z","dependencies_parsed_at":"2023-03-13T02:28:49.881Z","dependency_job_id":null,"html_url":"https://github.com/rkc007/Digit-Recognizer-Using-FFNN","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rkc007/Digit-Recognizer-Using-FFNN","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkc007%2FDigit-Recognizer-Using-FFNN","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkc007%2FDigit-Recognizer-Using-FFNN/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkc007%2FDigit-Recognizer-Using-FFNN/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkc007%2FDigit-Recognizer-Using-FFNN/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rkc007","download_url":"https://codeload.github.com/rkc007/Digit-Recognizer-Using-FFNN/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rkc007%2FDigit-Recognizer-Using-FFNN/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33111501,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["feedforward-neural-network","machine-learning","neural-network","tensorflow"],"created_at":"2024-11-08T19:18:23.965Z","updated_at":"2026-05-16T17:10:04.097Z","avatar_url":"https://github.com/rkc007.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Digit Recognizer Using Feed Forward Neural Network (FFNN) in TensorFlow\n\nThis project is aiming to recognize the gray-scale images of hand-drawn digits from zero through nine using FFNN. Moreover, the effects of number of layers, different regularization techniques (dropout, L1 regulariztion, L2 regularization), learning rates, epochs, batch sizes and width of layers have been investigated to incease the prediction accuracy of the model.\n\nThe data can be accessed here: [Kaggle](https://www.kaggle.com/c/digit-recognizer/data)\n\n## Architecture of FFNN\n\nThe best FFNN has four hidden layers with ReLU as the activation functions. The first, second, third and fourth hidden layers have 300, 300, 200 and 100 neurons, respectively.  The output layer outputs the logits, which then goes through the softmax activation function. We utilized cross entropy as the loss function and gradient descent optimizer to train the model. The network takes 28*28 features as the number of inputs for each instance, and outputs 10 probabilities for each class. The predicted class is determined by the highest probability among the ten.\n\n\u003cimg width=\"75%\" alt=\"tensorboard_graph\" src=\"https://user-images.githubusercontent.com/42804316/57877884-d3bbe280-77e6-11e9-8904-69b700d92cfe.png\"\u003e\u003cimg width=\"25%\" alt=\"simplified_flowchart\" src=\"https://user-images.githubusercontent.com/42804316/57877902-dd454a80-77e6-11e9-80ee-68fac531fc7e.png\"\u003e\u003cbr /\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;Fig 1. Tensorboard Computational Graph (left) and Simplified Flowchart (right)\n\n## Results\n\nBased on the optimized architecture, the training set's accuracy reached 100% and its loss was 0.004, and the test set's obtained an accuracy of 97.3% and its loss was 0.1 as shown in the follow graphs.\n\n\u003cimg width=\"49%\" alt=\"accuracy\" src=\"https://user-images.githubusercontent.com/42804316/57878895-1d0d3180-77e9-11e9-8ac7-2501b77da0de.png\"\u003e\u003cimg width=\"51%\" alt=\"loss\" src=\"https://user-images.githubusercontent.com/42804316/57878900-20a0b880-77e9-11e9-9cd1-48f0cb4bc8a7.png\"\u003e\u003cbr /\u003e \u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;Fig 2. Accuracy (left) and Loss (right) For Training and Testing Data With Epochs (graphs from tensorboard)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkc007%2Fdigit-recognizer-using-ffnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frkc007%2Fdigit-recognizer-using-ffnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frkc007%2Fdigit-recognizer-using-ffnn/lists"}