bunsen 0.41.0

bunsen is a batteries included common library for burn
Documentation
//! # 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`].

#[cfg(feature = "reflection")]
pub mod reflection;

mod has_dtype;
mod module_init;
mod rekey;
mod to_structure_config;
mod type_mapper;

pub use has_dtype::*;
pub use module_init::*;
pub use rekey::*;
pub use to_structure_config::*;
pub use type_mapper::*;