{"slug": "show-hn-i-created-a-new-deep-learning-framework", "title": "Show HN: I created a new Deep Learning Framework", "summary": "A developer released picodl, a from-scratch deep learning framework built solely on numpy with zero dependencies, featuring a hand-traced autograd engine and 25+ differentiable ops. The framework includes layers, losses, optimizers, and a training loop, installable via pip install picodl-nn. It aims to provide fully readable code for educational purposes.", "body_md": "// numpy-only · zero dependencies\n\npicodl is a from-scratch autograd engine and neural network stack - every gradient traced by hand, every op built on plain numpy. No hidden framework underneath.\n\n``` bash\n$ pip install picodl-nn\n```\n\n// what's inside\n\nEach piece does one job and hands a plain `Tensor`\n\nto the next. Nothing is generated for you - every layer, loss, and optimizer is code you can read start to finish.\n\ntensor.py\n\nTracks every op into a graph, topologically sorts on `.backward()`\n\n. 25+ differentiable ops: matmul, conv2d, softmax, attention primitives, and more.\n\nlayers.py\n\nLinear, Conv2D, Embedding, LayerNorm, BatchNorm2D, MaxPool2D, AvgPool2D, GlobalAvgPool, Dropout, GELU, TiedLinear.\n\nloss.py\n\nMSE, BinaryCrossEntropy, NLLLoss, CrossEntropyLoss - built from the same primitive ops as everything else.\n\noptim.py\n\nSGD, RMSprop, Adam, AdamW - decoupled weight decay included, per-parameter state tracked by identity.\n\nnn.py\n\nChains layers, exposes params for the optimizer, saves and loads weights to any file extension you like.\n\ndata.py / train.py\n\nBatchIterator for mini-batches, a train loop that accepts raw numpy or Tensor input directly.\n\n// thirty seconds in\n\nA small classifier - GELU hidden layer, Adam optimizer, saved to disk when done.\n\n``` python\nfrom picodl.nn import NeuralNet\nfrom picodl.layers import Linear, GELU\nfrom picodl.loss import CrossEntropyLoss\nfrom picodl.optim import AdamW\nfrom picodl.train import train\n\nnet = NeuralNet([\n    Linear(784, 128),\n    GELU(),\n    Linear(128, 10),\n])\n\ntrain(net, x_train, y_train,\n      num_epochs=10,\n      loss=CrossEntropyLoss(),\n      optimizer=AdamW(lr=0.001, weight_decay=0.01))\n\nnet.save(\"model.picodl\")\n```\n\n", "url": "https://wpnews.pro/news/show-hn-i-created-a-new-deep-learning-framework", "canonical_source": "https://picodl.vercel.app", "published_at": "2026-08-05 08:53:07+00:00", "updated_at": "2026-08-05 09:22:43.590410+00:00", "lang": "en", "topics": ["machine-learning", "developer-tools"], "entities": ["picodl"], "alternates": {"html": "https://wpnews.pro/news/show-hn-i-created-a-new-deep-learning-framework", "markdown": "https://wpnews.pro/news/show-hn-i-created-a-new-deep-learning-framework.md", "text": "https://wpnews.pro/news/show-hn-i-created-a-new-deep-learning-framework.txt", "jsonld": "https://wpnews.pro/news/show-hn-i-created-a-new-deep-learning-framework.jsonld"}}