Expand description
Derive and procedural macros for Burn.
Use these through burn, which re-exports them; this crate is not meant to be a direct
dependency.
#[derive(Module)]implementsModulefor a struct or enum of modules, parameters and constants.#[module(skip)]excludes a field.#[derive(Config)]makes a struct a serializable configuration with a generatednewconstructor andwith_*setters for optional fields and fields marked#[config(default = ...)].#[derive(RecordState)]decomposes an optimizer or scheduler state into named tensors and scalars for the burnpack format.
The function-like macros below implement burn::tensor::assert_shape!,
debug_assert_shape! and einsum!, and are not part of the public API.
Derive Macrosยง
- Config
- Derive macro for the config.
- Module
- Derive macro for the
Moduletrait. - Record
State - Derive macro for a recordable state (optimizer or learning-rate scheduler), decomposing it into named tensors and scalars for the burnpack format.