A grab-bag of ready-to-copy example scripts for common deep-learning architectures (NN, CNN, ResNet, RNN/LSTM, GRU, AutoEncoder, VAE, text classification, GAN, DQN).
Project description
dnn-tech
A grab-bag of ready-to-copy example scripts covering common deep-learning architectures: basic feed-forward NN, CNN, ResNet, RNN/LSTM, GRU sentiment model, AutoEncoder, VAE image generation, text classification, GAN, and DQN reinforcement learning — all on MNIST/toy data so they run out of the box.
Each example is stored as a string and printed to stderr when you call the corresponding function, so you can quickly copy a working starting point for a given architecture.
Install
pip install dnn-tech
(For local development, from the repo root:)
pip install -e .
Usage
import dnn_tech
dnn_tech.commands() # list every available example
dnn_tech.p2_CNN() # print the CNN example script (goes to stderr)
dnn_tech.all_lib() # print `pip install` commands for the libraries
# used across the examples (tensorflow, torch, ...)
Or from the command line:
dnn-tech # list available example functions
dnn-tech p2_CNN # print the CNN example script
dnn-tech all_lib # print pip install commands for dependencies
Available examples
| Function | Architecture |
|---|---|
p1_BasicNN() |
Basic feed-forward NN (Keras, MNIST) |
p2_CNN() |
CNN (Keras, MNIST) |
p3_Resnet() |
ResNet-50 (PyTorch, torchvision) |
p4_RNN_LSTM() |
RNN/LSTM (Keras, toy sequence data) |
p42_RNN_LSTM() |
RNN/LSTM (Keras, sine-wave forecasting) |
p5_LSTM() |
Char-level LSTM text generation |
p6_GRU_Sentiment() |
GRU sentiment classifier |
p7_AutoEncoder() |
AutoEncoder |
p8_vae_imggen() |
Variational AutoEncoder image gen |
p10_text_classification() |
Text classification |
p11_gan() |
GAN |
p12_deepq() |
Deep Q-Network (PyTorch, CartPole) |
all_lib() |
Print pip install commands |
commands() |
List all available commands |
Note:
commands()mentions ap9_trans()(Transformer example), but that function isn't implemented in the source yet — calling it will raiseAttributeError. Add it tosrc/dnn_tech/core.pyand re-export it from__init__.pywhen it's ready.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dnn_tech_ds-0.1.0.tar.gz.
File metadata
- Download URL: dnn_tech_ds-0.1.0.tar.gz
- Upload date:
- Size: 21.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
358188deb5a06039dd42c0d2bb4b2be673980a83e79470819fff4dea8abfbded
|
|
| MD5 |
683b0c12306871a50225c776dd935d61
|
|
| BLAKE2b-256 |
82dfbaa2bf632fb14b040f11394b99b072652992bac4f488f0277ecbacf23c56
|
File details
Details for the file dnn_tech_ds-0.1.0-py3-none-any.whl.
File metadata
- Download URL: dnn_tech_ds-0.1.0-py3-none-any.whl
- Upload date:
- Size: 20.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
94ff376538ad6d6745f2633a73eba9751296e5b2bee7c4468f1cc67555f3b127
|
|
| MD5 |
f75b0818a00500441cec092513322227
|
|
| BLAKE2b-256 |
7eb3ebabc49641afc1c34508a10514fde173aed9f31e82a9382336e73d74989a
|