Move the VarMap to a separate file (#525)

* Move the var-map struct in a separate file.

* Fix some typos.
This commit is contained in:
Laurent Mazare
2023-08-20 14:25:07 +01:00
committed by GitHub
parent 2fcb386f17
commit d2622a8160
3 changed files with 97 additions and 91 deletions

View File

@ -12,6 +12,7 @@ pub mod loss;
pub mod ops;
pub mod optim;
pub mod var_builder;
pub mod var_map;
pub use activation::Activation;
pub use batch_norm::{batch_norm, BatchNorm, BatchNormConfig};
@ -22,7 +23,8 @@ pub use init::Init;
pub use layer_norm::{layer_norm, rms_norm, LayerNorm, LayerNormConfig, RmsNorm};
pub use linear::{linear, linear_no_bias, Linear};
pub use optim::{AdamW, ParamsAdamW, SGD};
pub use var_builder::{VarBuilder, VarMap};
pub use var_builder::VarBuilder;
pub use var_map::VarMap;
// A simple trait defining a module with forward method using a single argument.
pub trait Module: std::fmt::Debug {