{"id":15290483,"url":"https://github.com/haidousm/fine","last_synced_at":"2025-04-13T10:12:07.523Z","repository":{"id":45133718,"uuid":"327638614","full_name":"haidousm/fine","owner":"haidousm","description":"an artificial neural network framework built from scratch using just Python and Numpy","archived":false,"fork":false,"pushed_at":"2022-01-06T10:51:27.000Z","size":60260,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T01:35:51.597Z","etag":null,"topics":["convolutional-neural-networks","keras","neural-network","numpy","python","scratch-implementation"],"latest_commit_sha":null,"homepage":"https://haidousm.com/fine/","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/haidousm.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}},"created_at":"2021-01-07T14:40:26.000Z","updated_at":"2022-01-06T10:51:30.000Z","dependencies_parsed_at":"2022-09-24T20:20:36.535Z","dependency_job_id":null,"html_url":"https://github.com/haidousm/fine","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/haidousm%2Ffine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haidousm%2Ffine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haidousm%2Ffine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/haidousm%2Ffine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/haidousm","download_url":"https://codeload.github.com/haidousm/fine/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248695481,"owners_count":21146956,"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":["convolutional-neural-networks","keras","neural-network","numpy","python","scratch-implementation"],"created_at":"2024-09-30T16:08:20.469Z","updated_at":"2025-04-13T10:12:07.470Z","avatar_url":"https://github.com/haidousm.png","language":"Python","readme":"# Fine\nA keras-like neural network framework built purely using Python and Numpy that's just that, fine.\n\n## Table of Contents  \n[1- How to use](#how-to-use)  \n[2- Demo](#demo)  \n[3- Technical Specifications](#technical)\n\n## \u003ca name=\"how-to-use\"\u003e\u003c/a\u003e How to use\n```\ngit clone git@github.com:haidousm/fine.git\ncd fine\npython3 -m pip install -r requirements.txt\n```\n\n## \u003ca name=\"demo\"\u003e\u003c/a\u003e Demo\n### [MNIST Demo Link](https://haidousm.com/fine-mnist-demo/)\nDemo was built using javascript for the frontend, and a flask server to serve predictions from the model.\n\nDemo model creation \u0026 training:\n\n```\nfrom datasets import load_mnist\nfrom models import Sequential\n\nfrom layers import Conv2D\nfrom layers import MaxPool2D\nfrom layers import Flatten\nfrom layers import Dense\n\nfrom activations import ReLU\nfrom activations import Softmax\n\nfrom loss import CategoricalCrossEntropy\n\nfrom models.model_utils import Categorical\n\nfrom optimizers import Adam\n\nX_train, y_train, X_test, y_test = load_mnist()\n\nmodel = Sequential(\n    layers=[\n        Conv2D(16, (1, 3, 3)),\n        ReLU(),\n        Conv2D(16, (16, 3, 3)),\n        ReLU(),\n        MaxPool2D((2, 2)),\n\n        Conv2D(32, (16, 3, 3)),\n        ReLU(),\n        Conv2D(32, (32, 3, 3)),\n        ReLU(),\n        MaxPool2D((2, 2)),\n\n        Flatten(),\n        Dense(1568, 64),\n        ReLU(),\n        Dense(64, 64),\n        ReLU(),\n        Dense(64, 10),\n        Softmax()\n    ],\n    loss=CategoricalCrossEntropy(),\n    optimizer=Adam(decay=1e-3),\n    accuracy=Categorical()\n)\n\nmodel.train(X_train, y_train, epochs=5, batch_size=120, print_every=100)\nmodel.evaluate(X_test, y_test, batch_size=120)\n\n\n```\n\n## \u003ca name=\"technical\"\u003e\u003c/a\u003eTechnical Specifications\n### Layers\n- [X] Dense Layer\n- [X] Dropout Layer\n- [X] Flatten Layer\n- [X] 2D Convolutional Layer\n- [X] Max Pool Layer\n\n### Activation Functions\n- [X] Rectified Linear (ReLU)\n- [X] Sigmoid\n- [X] Softmax\n- [X] Linear\n\n### Loss Functions\n- [X] Categorical Cross Entropy\n- [X] Binary Cross Entropy\n- [X] Mean Squared Error\n\n### Optimizers\n- [X] Stochastic Gradient Descent (SGD) with rate decay and momentum\n- [X] Adaptive Moment Estimation (ADAM)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaidousm%2Ffine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhaidousm%2Ffine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhaidousm%2Ffine/lists"}