//! # Tuphium
//!
//! Tuphium is a minimal deep-learning framework in Rust built for learning and
//! experimentation.  It provides reverse-mode automatic differentiation, a
//! column-oriented DataFrame for data loading and preprocessing, and a
//! modular neural-network API with pluggable compute backends.
//!
//! The crate is organised around a small set of primitives:
//!
//! - **`autograd::Value`** – a scalar autograd node that records its
//!   computation graph and supports backpropagation.
//! - **`linalg`** – dense matrix operations dispatched to the active backend
//!   (CPU by default, optional CUDA/cuBLAS).
//! - **`layers::Module`** and **`layers::Layer`** – the trait and concrete
//!   dense layer that together make up neural-network building blocks.
//! - **`losses`** – differentiable loss functions (MSE, CrossEntropy, BCE).
//! - **`optimizers`** – parameter-update rules (SGD).
//! - **`frame`** – CSV reading, a column-oriented `DataFrame`, and a
//!   `Dataset` wrapper for train/validation/test splitting.
//! - **`error`** – a unified `TuphiumError` type used throughout the crate.
//!
//! ## Backend selection
//!
//! By default Tuphium uses the pure-Rust CPU backend.  Enable the `gpu`
//! feature for CUDA/cuBLAS (nVIDIA GPUs only):
//!
//! ```toml
//! [dependencies]
//! tuphium = { git = "...", features = ["gpu"] }
//! ```
//!
//! See the individual module docs for usage examples.
//! 
//! ## Limitations
//!
//! Crate is still in early development. Current limitations include:
//! - No support for convolutional layers, recurrent layers, or attention.
//! - Optimization is limited to SGD; no Adam, RMSProp, etc.
//! - GPU backend needs optimization.
//! - No support for multi-GPU or distributed training.

// Compute backend selection (CPU / GPU). Backend and BACKEND live here and are
// accessed as `tuphium::backend::{Backend, BACKEND}`.
pub mod backend;

// Row-major dense matrix (re-exported from the active backend).
pub mod linalg;

// Reverse-mode scalar autograd engine (`Value`).
pub mod autograd;

// Structured error type shared across the crate.
pub mod error;

// Activation functions.
pub mod activations;

// Module trait and layers (dense `Layer`).
pub mod layers;

// Loss functions (BCE, MSE, CrossEntropy) with forward and backward.
pub mod losses;

// Optimizers (`SGD`).
pub mod optimizers;

// Data utilities: CSV reading, `DataFrame`, `Dataset`.
pub mod frame;
