Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

borgwang/tinynn

Repository files navigation

tinynn

CI Language grade: Python codecov

tinynn is a lightweight deep learning framework written in Python3 (for learning purposes).

Getting Started

Install

pip3 install tinynn

Run examples

git clone https://github.com/borgwang/tinynn.git
cd tinynn/examples
# MNIST classification
python3 mnist/run.py
# a toy regression task
python3 nn_paint/run.py
# reinforcement learning demo (gym environment required)
python3 rl/run.py

Intuitive APIs

# define a model
net = Net([Dense(50), ReLU(), Dense(100), ReLU(), Dense(10)])
model = Model(net=net, loss=MSE(), optimizer=Adam(lr))
# train
for batch in iterator(train_x, train_y):
 preds = model.forward(batch.inputs)
 loss, grads = model.backward(preds, batch.targets)
 model.apply_grads(grads)

Contribute

Please follow the Google Python Style Guide for Python coding style.

License

MIT

About

A lightweight deep learning library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

Languages

AltStyle によって変換されたページ (->オリジナル) /