Skip to main content

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 a p9_trans() (Transformer example), but that function isn't implemented in the source yet — calling it will raise AttributeError. Add it to src/dnn_tech/core.py and re-export it from __init__.py when it's ready.

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dnn_tech_ds-0.1.0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dnn_tech_ds-0.1.0-py3-none-any.whl (20.9 kB view details)

Uploaded Python 3

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

Hashes for dnn_tech_ds-0.1.0.tar.gz
Algorithm Hash digest
SHA256 358188deb5a06039dd42c0d2bb4b2be673980a83e79470819fff4dea8abfbded
MD5 683b0c12306871a50225c776dd935d61
BLAKE2b-256 82dfbaa2bf632fb14b040f11394b99b072652992bac4f488f0277ecbacf23c56

See more details on using hashes here.

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

Hashes for dnn_tech_ds-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 94ff376538ad6d6745f2633a73eba9751296e5b2bee7c4468f1cc67555f3b127
MD5 f75b0818a00500441cec092513322227
BLAKE2b-256 7eb3ebabc49641afc1c34508a10514fde173aed9f31e82a9382336e73d74989a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page