A tool to generate PyTorch neural network code from flowchart images
Project description
Sketch NN
Transform hand-drawn neural network sketches into functional PyTorch code
Sketch NN is an innovative Python library that transforms hand-drawn neural network sketches into functional PyTorch code. Design your neural architectures on paper, capture them with our tool, and watch as Sketch NN brings your ideas to life!
🌟 Features
- 📸 Process hand-drawn or digital sketches of neural network architectures
- 🧠 Support for a wide range of neural network layers
- 🔧 Generate ready-to-use PyTorch code
- 🖥️ User-friendly Gradio web interface for quick prototyping
- 🚀 FastAPI backend for scalable deployment
🛠️ Supported Layers
- Convolutional (Conv2D)
- Pooling (MaxPool2D, AvgPool2D)
- Fully Connected (Linear)
- Batch Normalization
- Dropout
- Activation Functions (ReLU, LeakyReLU, Sigmoid, Tanh)
- Recurrent (LSTM, GRU)
- Transformer
- Multi-head Attention
🚀 Installation
Install Sketch NN using pip:
pip install sketch_nn
🚀 Usage
from sketch_nn import NeuralNetworkDesigner
designer = NeuralNetworkDesigner()
designer.process_image('path_to_your_sketch.png')
pytorch_code = designer.generate_pytorch_code()
designer.write_to_file(pytorch_code, 'custom_nn.py')
Gradio Web Interface Demo
from sketch_nn.demo import run_gradio_demo
run_gradio_demo()
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
sketch_nn-0.1.3.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for sketch_nn-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 123f76d0efca0ee9a08f373c7b3b66995aebab85b679b9c7d91d82eab5b8a405 |
|
MD5 | 60ee97b505234b67a7108901c5a0de01 |
|
BLAKE2b-256 | a39a58c2d1773016c178a24540196c7f373502d24ff7082ee5b30888bdc47f92 |