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
//! # WiFi-DensePose Training Infrastructure
//!
//! This crate provides the complete training pipeline for the WiFi-DensePose pose
//! estimation model. It includes configuration management, dataset loading with
//! subcarrier interpolation, loss functions, evaluation metrics, and the training
//! loop orchestrator.
//!
//! ## Architecture
//!
//! ```text
//! TrainingConfig ──► Trainer ──► Model
//! │ │
//! │ DataLoader
//! │ │
//! │ CsiDataset (MmFiDataset | SyntheticCsiDataset)
//! │ │
//! │ subcarrier::interpolate_subcarriers
//! │
//! └──► losses / metrics
//! ```
//!
//! ## Quick Start
//!
//! ```rust,no_run
//! use wifi_densepose_train::config::TrainingConfig;
//! use wifi_densepose_train::dataset::{SyntheticCsiDataset, SyntheticConfig, CsiDataset};
//!
//! // Build config
//! let config = TrainingConfig::default();
//! config.validate().expect("config is valid");
//!
//! // Create a synthetic dataset (deterministic, fixed-seed)
//! let syn_cfg = SyntheticConfig::default();
//! let dataset = SyntheticCsiDataset::new(200, syn_cfg);
//!
//! // Load one sample
//! let sample = dataset.get(0).unwrap();
//! println!("amplitude shape: {:?}", sample.amplitude.shape());
//! ```
// Note: #![forbid(unsafe_code)] is intentionally absent because the `tch`
// dependency (PyTorch Rust bindings) internally requires unsafe code via FFI.
// All *this* crate's code is written without unsafe blocks.
// The following modules use `tch` (PyTorch Rust bindings) for GPU-accelerated
// training and are only compiled when the `tch-backend` feature is enabled.
// Without the feature the crate still provides the dataset / config / subcarrier
// APIs needed for data preprocessing and proof verification.
// Convenient re-exports at the crate root.
pub use TrainingConfig;
pub use ;
pub use ;
// TrainResult<T> is the generic Result alias from error.rs; the concrete
// TrainResult struct from trainer.rs is accessed via trainer::TrainResult.
pub use TrainResult as TrainResultAlias;
pub use ;
// MERIDIAN (ADR-027) re-exports.
pub use ;
pub use CrossDomainEvaluator;
pub use ;
pub use ;
pub use VirtualDomainAugmentor;
/// Crate version string.
pub const VERSION: &str = env!;