Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor/optim #272

Merged
merged 13 commits into from
Apr 5, 2023
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