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
//! # Module Support
//!
//! Helpers for building `burn` modules from configs, and for working with
//! them once built.
//!
//! - [`ModuleInit`] — the Config → Module step. A bunsen config that
//! builds its module from a device alone implements it, with a fallible
//! `try_init` and a panicking `init`. Its docs are the reference for the
//! config lifecycle: the Simple Config and Stacked Config shapes, each with a
//! compiled example.
//! - [`ToStructureConfig`] — the config-side twin of `ModuleInit`: it
//! lowers an upper policy config of a Stacked Config family to its structure
//! config, and a blanket impl gives every implementor `ModuleInit` through
//! that structure.
//! - [`HasDType`] — reports the [`DType`](burn::tensor::DType) a value
//! works in, such as the precision a model's parameters were loaded at.
//! - [`DTypeMapper`] — a [`ModuleMapper`](burn::module::ModuleMapper)
//! that casts every float parameter of a built module to one `DType`
//! (`model.map(&mut DTypeMapper::new(DType::F16))`).
//! - [`reflection`] — (feature `reflection`) a queryable XML view of a
//! built module tree, for selecting parameters with `XPath`.
//! - [`Rekey`] — a checkpoint's tensor names to a module's paths, built
//! from rules: a kit routes a checkpoint's prefixes onto its model's fields
//! and mounts each block's own map for the checkpoint's format there.
//!
//! `ModuleInit` and `ToStructureConfig` are also in [`crate::prelude`].
pub use *;
pub use *;
pub use *;
pub use *;
pub use *;