{"id":20976200,"url":"https://github.com/realtristan/micronet","last_synced_at":"2026-05-03T11:35:23.821Z","repository":{"id":244545103,"uuid":"813721339","full_name":"realTristan/micronet","owner":"realTristan","description":"Neural network library from scratch","archived":false,"fork":false,"pushed_at":"2024-06-15T13:33:43.000Z","size":26,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-02T11:49:55.955Z","etag":null,"topics":["neural-networks","numpy","python","pytorch"],"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/realTristan.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":"2024-06-11T15:55:54.000Z","updated_at":"2024-06-15T13:33:47.000Z","dependencies_parsed_at":"2024-06-15T14:43:01.359Z","dependency_job_id":"322593e0-84aa-4099-b9fa-b00e0643e11d","html_url":"https://github.com/realTristan/micronet","commit_stats":null,"previous_names":["realtristan/micronet"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/realTristan/micronet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fmicronet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fmicronet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fmicronet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fmicronet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/realTristan","download_url":"https://codeload.github.com/realTristan/micronet/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/realTristan%2Fmicronet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32567483,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["neural-networks","numpy","python","pytorch"],"created_at":"2024-11-19T04:51:23.539Z","updated_at":"2026-05-03T11:35:23.806Z","avatar_url":"https://github.com/realTristan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# micronet\nWelcome to micronet!\n\n### What is micronet?\nMicronet is a `PyTorch` syntax inspired neural network python library! \nAndrej Karpathy's `micrograd` inspired the actual creation of this library. His video\n`The spelled-out intro to neural networks and backpropagation: building micrograd` really\nhelped me grasp the concepts of neural networks, allowing me to build `micronet` on my own!\n\n### Example\nThis is an example output from running the `main.py` script.\n\n#### Imports\nThe imports used in the example!\n\n```python3\nfrom engine.nn.module import Module\nfrom engine.nn.linear import Linear\nfrom engine.nn.activation import ReLU\nfrom engine.loss import MSELoss\n```\n\n#### Model Class\nDefining our model!\n\n```python3\nclass MLPModel(Module):\n    def __init__(self) -\u003e None:\n        super(MLPModel, self).__init__([\n            Linear(3, 128),\n            ReLU(),\n            Linear(128, 16),\n            ReLU(),\n            Linear(16, 1),\n            ReLU(),\n        ])\n```\n\n#### Model, Criterion, Hyperparameters, \u0026 Data\nThe model initialization, loss function, hyperparameters, and the data that was used!\n\n```python3\n## Model, Criterion, and Hyperparameters\nmodel = MLPModel()\ncriterion = MSELoss()\nlr = 0.1\nepochs = 100\n\n## Train data and corresponding labels\ntrain_data = [\n    [1.70, 70, 1],\n    [1.60, 50, 0],\n    [1.80, 80, 1],\n    [1.85, 90, 1],\n    [1.75, 75, 0],\n    [1.65, 55, 0],\n]\ntrain_labels = [25, 20, 30, 35, 27, 22]\n\n## Test data and corresponding labels\ntest_data = [\n    [1.75, 80, 1],\n    [1.65, 55, 0],\n]\ntest_labels = [30, 22]\n```\n\n#### Training \u0026 Testing Loops\nThe actual loops used to train and then test the network!\n\n```python3\n##\n## Train the network\n##\nfor epoch in range(epochs):\n    for x, y in zip(train_data, train_labels):\n        model.zero_grad()\n\n        y_pred = model(x)\n\n        criterion(y, y_pred)\n        criterion.backward()\n\n    model.update(lr)\n\n    print(f\"Epoch {epoch}, Loss: {criterion}\")\n\n##\n## Test the network\n##\nprint(\"\\nTest\")\nfor i, x in enumerate(test_data):\n    y = model(x)\n    print(f\"Prediction: {y.data}, Actual: {test_labels[i]}\")\n```\n\n#### Terminal Output\nThe output when all of the above code is put together!\n\n```bash\nTest\nPrediction: 31.31720183645183, Actual: 30\nPrediction: 21.999999999402718, Actual: 22\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtristan%2Fmicronet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frealtristan%2Fmicronet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frealtristan%2Fmicronet/lists"}