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
// Clippy lints suppressed intentionally for the entire crate:
//
// - `too_many_arguments`: convolution-style APIs legitimately take many tuple
// parameters (stride, padding, dilation, groups...). Wrapping them in
// config structs hurts ergonomics more than it helps.
// - `type_complexity`: the backend trait returns
// `(Vec<DeviceData>, Memo<DeviceData>)` which clippy flags, but hiding it
// behind a type alias makes navigation harder.
// - `should_implement_trait`: internal `add` method on the gradient builder
// has a different signature than `std::ops::Add::add` on purpose.
//! # RustyASG: Graph-based Deep Learning Engine in Rust
//!
//! **RustyASG** is a modern experimental deep learning framework written in Rust.
//! Its key feature is an architecture built around the **Abstract Semantic Graph (ASG)**.
//!
//! ## Usage Example
//!
//! ```no_run
//! use std::rc::Rc;
//! use std::cell::RefCell;
//! use rustyasg::tensor::{GraphContext, Tensor};
//! use rustyasg::losses::mse_loss;
//!
//! // 1. Create graph context
//! let context = Rc::new(RefCell::new(GraphContext::new()));
//!
//! // 2. Define symbolic inputs
//! let input = Tensor::new_input(&context, "input");
//! let expected = Tensor::new_input(&context, "expected");
//!
//! // 3. Build computation graph
//! let prediction = input.relu(); // Just an example operation
//! let loss = mse_loss(&prediction, &expected);
//!
//! // Graph is ready for analysis, differentiation, and execution on a backend!
//! ```
// Declare public modules that constitute the core library API.