Skip to content

Commit

Permalink
Refactor/optim (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanielsimard authored Apr 5, 2023
1 parent 0f6172f commit ca8ee07
Show file tree
Hide file tree
Showing 30 changed files with 744 additions and 652 deletions.
2 changes: 0 additions & 2 deletions burn-core/src/module/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
mod base;
mod param;
mod state;

pub use base::*;
pub use param::*;
pub use state::*;
6 changes: 6 additions & 0 deletions burn-core/src/module/param/id.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ impl From<&str> for ParamId {
}
}

impl From<String> for ParamId {
fn from(value: String) -> Self {
Self { value }
}
}

impl Default for ParamId {
fn default() -> Self {
Self::new()
Expand Down
5 changes: 4 additions & 1 deletion burn-core/src/module/param/primitive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ where
impl<const N: usize, T, B> Module<B> for [T; N]
where
T: Module<B> + Debug + Send + Sync + Clone + Copy,
T::Record: Debug,
B: Backend,
{
type Record = [T::Record; N];
Expand Down Expand Up @@ -201,7 +202,9 @@ where
impl<const N: usize, T, B> ADModule<B> for [T; N]
where
T: ADModule<B> + Debug + Send + Sync + Clone + Copy,
T::InnerModule: Copy,
T::InnerModule: Copy + Debug,
<T::InnerModule as Module<B::InnerBackend>>::Record: Debug,
<T as Module<B>>::Record: Debug,
B: ADBackend,
{
type InnerModule = [T::InnerModule; N];
Expand Down
105 changes: 0 additions & 105 deletions burn-core/src/module/state.rs

This file was deleted.

Loading

0 comments on commit ca8ee07

Please sign in to comment.