How jamormoussa/nanotorch works
Project type and purpose
• NanoTorch is an open-source, pure-Python deep learning micro-framework inspired by PyTorch.
• Its goal is educational: to illustrate how tensors, layers, losses, and optimizers interact under the hood using only NumPy.
File structure
• Top-level:
• main.py – a demonstration or CLI entry point.
• test.py & test/ – example and unit tests exercising the library.
• docs/ + mkdocs.yml – documentation site source for MkDocs, including notebooks and markdown.
• .github/workflows/deploy.yml – CI/CD pipeline for building and deploying the docs.
• Core package: nanotorch/
• tensor/ – Tensor class + low-level ops (nanotorch/tensor).
• nn/ – neural network abstractions (base Module, functional API, container, activation, linear modules, loss functions).
• optim/ – optimizer framework and SGD implementation.
• utils/ – decorators (e.g., dtypes) and other helpers.
Extract additional insights from the README
• Highlights the basic workflow: define a Module subclass, use nn.Sequential, build a training loop with MSELoss and SGD on numpy-backed Tensors.
• Demonstrates core components: Tensor, Module, Loss, Optimizer.