MaidenX
Rust-based CUDA library designed for learning purposes and building my AI engines named Maiden Engine
[![License](https://img.shields.io/badge/license-MIT%2FApache-blue.svg)](https://github.com/miniex/maidenx#license)
[![Crates.io](https://img.shields.io/crates/v/maidenx.svg)](https://crates.io/crates/maidenx)
> [!NOTE]
> This project is structured to resemble the PyTorch framework where possible, to aid in familiarization and learning.
> [!WARNING]
> 🚧 This project is for personal learning and testing purposes, so it may not function properly. 🚧
## Getting Started
### Prerequisites
- CUDA Toolkit
- CMake
### How to use
| | Using PyTorch | Using MaidenX |
|------------|------------------------------------------|-----------------------------------------------------------------------|
| Creation | `torch.Tensor([[1, 2], [3, 4]])` | `Tensor::new(vec![vec![1.0, 2.0], vec![3.0, 4.0]])` |
| Creation | `torch.Tensor([[1, 2], [3, 4]])` | `Tensor::from_vec(vec![1.0, 2.0, 3.0, 4.0], &[2, 2])` |
| Creation | `nn.Sequential(A, B, C)` | `nn::ModuleBuilder::new().add_layer(A).add_layer(B).add_layer(C)` |
### Example
```toml
[dependencies]
maidenx = { version = "0.0.5", features = ["full"] }
# only cpu
# maidenx = { version = "0.0.5" }
# only cuda, but cpu is default
# maidenx = {version = "0.0.5", features = ["cuda"]}
```
How to use Tensor:
```rust
use maidenx::prelude::*;
fn main() -> Result<(), Box