picodl is a minimal deep learning library designed from the ground up using only Python and numpy. It features a full autograd engine, layers, loss functions, and optimizers without relying on larger frameworks like PyTorch or TensorFlow.
Install with pip:
pip install picodl-nn
picodl is a lightweight deep learning library created from the ground up in Python, featuring a comprehensive autograd engine, modular layers, loss functions, optimizers, and a training loop. This unique framework, built entirely on top of plain NumPy, provides developers with a transparent and educational environment that eliminates the reliance on more complex frameworks like PyTorch or TensorFlow.
For detailed usage guidelines and API references, visit the documentation.
Here’s a simple example of how to define and train a neural network using picodl:
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")
picomath, written in C, to enhance performance further.No comments yet.
Sign in to be the first to comment.