Metadata-Version: 2.4
Name: embeddedtorch
Version: 0.1.3
Summary: Tiny neural network runtime for microcontrollers and computers inspired by PyTorch
Author-email: Muaz Alamri <muazalamri2006@gmail.com>
License: MIT License
        
        Copyright (c) 2025 muazalamri
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/muazalamri/embeddedtorch
Project-URL: Documentation, https://github.com/muazalamri/embeddedtorch#readme
Project-URL: Source, https://github.com/muazalamri/embeddedtorch
Project-URL: Issues, https://github.com/muazalamri/embeddedtorch/issues
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.20
Requires-Dist: torch>=2.0.0
Dynamic: license-file

# EmbeddedTorch

**Convert your PyTorch models to embedded C++ code**

EmbeddedTorch is a powerful Python library that allows you to convert PyTorch neural network models into optimized C++ code for deployment in embedded systems, microcontrollers, and resource-constrained environments.

## Key Features

- 🚀 **Easy Conversion**: Convert PyTorch models to C++ with simple Python API
- 📦 **Comprehensive Layers**: Support for linear, convolutional, pooling, normalization, and activation layers
- ⚙️ **Operations**: Rich set of mathematical and tensor operations
- 🎯 **Type-Safe**: Support for different data types (float32, float64, etc.)
- 🔧 **Flexible**: Custom layer definitions and model composition support
- 🏗️ **Production-Ready**: Generate clean, optimized C++ code

## Quick Start

```python
from layers import EmbaeddableModel, LinearLayer
import torch

# Create a model
model = EmbaeddableModel(torch.float32)
model.add_layer(LinearLayer(10, 5, dtype=torch.float32))
model.add_layer(LinearLayer(5, 2, dtype=torch.float32))

# Generate C++ code
write_dep()
with open("out/code.cpp", "w", encoding="utf-8") as f:
    print(cpp_code(model.list), file=f)
```

## Documentation

- **[Getting Started](https://muazalamri.github.io/embeddedtorch/getting-started)** - Installation and basic usage
- **[API Reference](https://muazalamri.github.io/embeddedtorch/api-reference)** - Detailed API documentation
- **[Layers](https://muazalamri.github.io/embeddedtorch/layers)** - Available layer types and usage
- **[Operations](https://muazalamri.github.io/embeddedtorch/operations)** - Mathematical operations
- **[Examples](https://muazalamri.github.io/embeddedtorch/examples)** - Complete working examples

## Get Started

Ready to convert your PyTorch models to C++? Check out the [Getting Started](https://muazalamri.github.io/embeddedtorch/getting-started) guide.

## Installation

```bash
pip install embeddedtorch
```

## License

MIT License - See LICENSE file for details

