Metadata-Version: 2.4
Name: pykeres
Version: 1.0.4
Summary: pykeres: Deep Learning Architecture Reference & Code Recipe Library
Author: Keres Contributors
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# pykeres (keres)

A modular Python reference library and cookbook containing structured implementations of fundamental Deep Learning model architectures and training routines across PyTorch and TensorFlow/Keras.

`pykeres` converts modular machine learning workflows into cell-by-cell plaintext recipes that can be browsed interactively, executed, or exported for rapid prototyping.

---

## Installation

Install from PyPI:

```bash
pip install pykeres
```

Or install in development/editable mode:

```bash
cd keres
pip install -e .
```

---

## Quickstart & Usage

Both `import keres` and `from pykeres import keres` are supported:

### 1. Built-in Interactive Guide
```python
import keres

# Open built-in interactive guide & cheat sheet
keres.guide()   # or keres.help()

# View customization recipes (Pandas CSV adapters, optimizers, loss functions):
keres.recipes(2)  # Swapping FashionMNIST with Pandas local CSV, Adam to SGD, Dropout
keres.recipes(7)  # MobileNetV2 -> ResNet/EfficientNet, fine-tuning rules
```

### 2. Exploring Architectures & Code
```python
import keres

# List all available architectures in the catalog
keres.list_architectures()

# Print architecture implementations cell-by-cell
keres.architecture(1)           # Single-Layer Perceptron (Decision Boundaries)
keres.architecture(2, recipes=True) # Full MLP code + customization recipes

# Inspect a single code cell (1-based index)
keres.architecture(1, cell=1)

# Named model shortcuts:
keres.perceptron()
keres.mlp()
keres.regularization()
keres.activations()
keres.cnn()
keres.lstm()
keres.transfer_learning()
keres.hparam_tuning()
keres.multi_loss()
```

### 3. Programmatic Access
```python
from keres import Keres

guide = Keres()

# Programmatic code string retrieval
code_str = guide.get_architecture(num=3)
cells = guide.get_cells(num=3)
for c in cells:
    print(f"Cell {c['cell_number']}: {c['title']}")

# Exporting utilities
guide.export_all_texts("./my_reference_notes")
guide.export_script(num=1, output_path="run_perceptron.py")
guide.export_notebook(num=1, output_path="perceptron.ipynb")
```

---

## Command-Line Interface (CLI)

`keres` provides an intuitive CLI:

```bash
# Display built-in guide & cheat sheet
keres guide     # or simply run: keres

# List all architectures
keres list

# Display an architecture cell-by-cell
keres show 1
keres show 2 --recipes

# Display a specific cell only
keres show 1 --cell 2

# View only the customization recipe (Pandas CSV, Optimizers, Architecture notes)
keres recipes 2

# Export all architecture guides as text files
keres export --out-dir ./dl_guides
```

---

## Architecture Catalog

| Index | Architecture / Topic | Framework | Cells |
| :---: | :--- | :--- | :---: |
| **0** | Multi-Loss Deep Neural Network Training | PyTorch | 5 |
| **1** | Single-Layer Perceptron (Decision Boundaries) | NumPy / Matplotlib | 2 |
| **2** | Multi-Layer Perceptron (MLP) Depth vs Width | PyTorch / Torchvision | 8 |
| **3** | Regularization Methods (L2 Weight Decay vs Dropout) | TensorFlow / Keras | 6 |
| **4** | Empirical Analysis of Non-Linear Activation Functions | PyTorch | 5 |
| **5** | Convolutional Neural Networks (CNN) vs MLP for Vision | PyTorch / Torchvision | 10 |
| **6** | Recurrent Neural Networks (LSTM) for Sequence Modeling | TensorFlow / Keras | 6 |
| **7** | Transfer Learning & Feature Fine-Tuning with MobileNetV2 | TensorFlow / Keras | 6 |
| **8** | Hyperparameter Optimization & TensorBoard Metric Tracking | PyTorch / TensorBoard | 5 |

---

## License

MIT License.
