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
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 sketch_nn-0.1.7.tar.gz.
File metadata
- Download URL: sketch_nn-0.1.7.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f64adc054c53986efce45e6d7f690e542ba60198d84ea58a2d03761ec73634d
|
|
| MD5 |
d4c07511b36f02a414d8d405ab095513
|
|
| BLAKE2b-256 |
90b1634d2f147a368de849aca650155dc9ac7de4d217acf95c1a89e6126b0e80
|
File details
Details for the file sketch_nn-0.1.7-py3-none-any.whl.
File metadata
- Download URL: sketch_nn-0.1.7-py3-none-any.whl
- Upload date:
- Size: 5.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f34497643afc1eba793d55b6acd7e580aab7b131073a34e1e1081aba701eed9
|
|
| MD5 |
643ffa2ae98df3528af0649e5d86ea0b
|
|
| BLAKE2b-256 |
7ae9139dd201dd52a94465ad140bce0440cc2f846317e6472262feef77cba86d
|