Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

picodl.

A tiny deep learning library built from scratch in Python - autograd engine, layers, losses, optimizers, and a training loop, all on top of plain numpy. No PyTorch, no TensorFlow, no hidden framework underneath.

Documentation

Documentation

Installation

Install picodl with pip

  pip install picodl

Running Tests

To run tests, run the following command

    # requires pytest, pip install pytest
    pytest -v

Demo

A sample model

from picodl.nn import NeuralNet
from picodl.layers import Linear, GELU
from picodl.loss import CrossEntropyLoss
from picodl.optim import AdamW
from picodl.train import train

net = NeuralNet([
    Linear(784, 128),
    GELU(),
    Linear(128, 10),
])

train(net, x_train, y_train,
      num_epochs=10,
      loss=CrossEntropyLoss(),
      optimizer=AdamW(lr=0.001, weight_decay=0.01))

net.save("model.picodl")

Authors

License

MIT

About

picodl 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

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages