1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
//! # GhostFlow - Complete Machine Learning Framework in Rust
//!
//! GhostFlow is a production-ready machine learning framework built entirely in Rust,
//! designed to rival PyTorch and TensorFlow in both performance and ease of use.
//!
//! ## Features
//!
//! - **Tensor Operations**: Multi-dimensional arrays with SIMD optimization
//! - **Automatic Differentiation**: Full autograd engine with computational graph
//! - **Neural Networks**: CNN, RNN, LSTM, GRU, Transformer, Attention
//! - **50+ ML Algorithms**: Decision trees, random forests, SVM, clustering, and more
//! - **GPU Acceleration**: Hand-optimized CUDA kernels (optional)
//! - **Production Ready**: Zero warnings, comprehensive tests, full documentation
//!
//! ## Quick Start
//!
//! ```rust
//! use ghostflow::prelude::*;
//!
//! // Create tensors
//! let x = Tensor::randn(&[32, 784]);
//! let y = Tensor::randn(&[32, 10]);
//!
//! // Tensor operations
//! let z = x.matmul(&y.transpose(0, 1).unwrap()).unwrap();
//! ```
//!
//! ## Installation
//!
//! Add to your `Cargo.toml`:
//!
//! ```toml
//! [dependencies]
//! ghostflow = "0.1"
//! ```
//!
//! With GPU support:
//!
//! ```toml
//! [dependencies]
//! ghostflow = { version = "0.1", features = ["cuda"] }
//! ```
//!
//! ## Modules
//!
//! - [`core`] - Core tensor operations and data structures
//! - [`nn`] - Neural network layers and building blocks
//! - [`ml`] - Classical machine learning algorithms
//! - [`autograd`] - Automatic differentiation
//! - [`optim`] - Optimizers (SGD, Adam, AdamW)
//! - [`data`] - Data loading and preprocessing utilities
//! - [`cuda`] - GPU acceleration (optional)
// Re-export core (always available)
pub use ghostflow_core as core;
pub use *;
// Re-export optional modules
pub use ghostflow_nn as nn;
pub use ghostflow_ml as ml;
pub use ghostflow_autograd as autograd;
pub use ghostflow_optim as optim;
pub use ghostflow_data as data;
pub use ghostflow_cuda as cuda;
/// Prelude module for convenient imports
///
/// Import everything you need with:
/// ```
/// use ghostflow::prelude::*;
/// ```