{"id":21555044,"url":"https://github.com/rnuv/artificial-neural-network","last_synced_at":"2025-03-18T03:19:42.583Z","repository":{"id":118662580,"uuid":"333134802","full_name":"rNuv/artificial-neural-network","owner":"rNuv","description":"A Simple 2 layered Artificial Neural Network library made from scratch in Python and NumPy. Fitted with a feed forward method and backpropagation.","archived":false,"fork":false,"pushed_at":"2023-06-15T05:50:09.000Z","size":184,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-24T10:27:01.715Z","etag":null,"topics":["neural-network","numpy","python","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/rNuv.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":"2021-01-26T15:51:42.000Z","updated_at":"2023-06-15T05:21:00.000Z","dependencies_parsed_at":"2024-11-24T08:15:11.136Z","dependency_job_id":null,"html_url":"https://github.com/rNuv/artificial-neural-network","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rNuv%2Fartificial-neural-network","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rNuv%2Fartificial-neural-network/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rNuv%2Fartificial-neural-network/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rNuv%2Fartificial-neural-network/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rNuv","download_url":"https://codeload.github.com/rNuv/artificial-neural-network/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244147343,"owners_count":20405942,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["neural-network","numpy","python","tensorflow"],"created_at":"2024-11-24T08:00:49.448Z","updated_at":"2025-03-18T03:19:42.561Z","avatar_url":"https://github.com/rNuv.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Artificial Neural Network\n\n## Description\nThis is a Python implementation of a very rudimentary 2 layer Neural Network class. The class features a method to feed forward a certain instance for a prediction and another method to train and adjust its weights based on a labelled data instance. I tested the neural network on a linearly inseparable problem like the XOR logic gate. I then tested it on the MNIST database of handwritten digits. With 784 input nodes, 64 hidden nodes and 10 output nodes, the net acheives about 94% accuracy on 10000 test images after being trained with 5 epochs on 60000 training images, which isn't too shabby 🤷 I compared my results with the same neural network implementation in Tensorflow and Tensorflow acheived about an accuracy of about 95-96%. \n\n## Instructions\nClone the repo and install the dependencies with \n```\npip install -r requirements.txt\n```\n\nDownload the MNIST data from the link below and place all 4 ubyte files in a folder called *data*. Label them *training_images*, *training_labels*, *test_images* and *test_labels* accordingly. Run the mnist_nn module to test the custom neural network and measure its performance. Run the mnist_tf module to test a Tensorflow implementation of the same neural network architecture on the MNIST data as a comparison.\n\n```\npython3 mnist_nn.py\n```\n\n```\npython3 mnist_tf.py\n```\n\n## Pictures\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"results.png\"\u003e\n\u003c/div\u003e\n\u003cp align=\"center\"\u003e\n  Results of the neural network implementation.\n\u003c/p\u003e\n\n## Technologies\n- ![NumPy](https://img.shields.io/badge/numpy-%23013243.svg?style=for-the-badge\u0026logo=numpy\u0026logoColor=white)\n- ![TensorFlow](https://img.shields.io/badge/TensorFlow-%23FF6F00.svg?style=for-the-badge\u0026logo=TensorFlow\u0026logoColor=white)\n- ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge\u0026logo=python\u0026logoColor=ffdd54)\n- MNIST database (http://yann.lecun.com/exdb/mnist/)\u003cbr /\u003e\n\n---\n*Made with \u003c3 by Arnav, circa 2020*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnuv%2Fartificial-neural-network","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frnuv%2Fartificial-neural-network","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frnuv%2Fartificial-neural-network/lists"}