From 341ee782820184c4a8a3ce7b37ba977328378c4f Mon Sep 17 00:00:00 2001 From: Corey Lowman Date: Wed, 25 Oct 2023 10:27:14 -0400 Subject: [PATCH] Fixing prelude/exports --- dfdx-core/src/lib.rs | 2 +- dfdx/src/lib.rs | 5 +---- dfdx/src/nn/layers/cos.rs | 2 +- dfdx/src/nn/layers/exp.rs | 2 +- dfdx/src/nn/layers/leaky_relu.rs | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dfdx-core/src/lib.rs b/dfdx-core/src/lib.rs index a7c5c111..337b43e8 100644 --- a/dfdx-core/src/lib.rs +++ b/dfdx-core/src/lib.rs @@ -168,7 +168,7 @@ pub fn keep_denormals() { #[cfg(test)] pub(crate) mod tests { - pub use num_traits::{Float, FromPrimitive, NumCast, Zero}; + pub use num_traits::{Float, NumCast, Zero}; #[cfg(not(feature = "cuda"))] pub type TestDevice = crate::tensor::Cpu; diff --git a/dfdx/src/lib.rs b/dfdx/src/lib.rs index 4e3122a2..a0a94d57 100644 --- a/dfdx/src/lib.rs +++ b/dfdx/src/lib.rs @@ -157,9 +157,6 @@ pub mod nn; -pub use dfdx_core::*; -pub use dfdx_derives::*; - pub use dfdx_core::*; pub mod prelude { @@ -169,7 +166,7 @@ pub mod prelude { #[cfg(test)] pub(crate) mod tests { - pub use num_traits::{Float, FromPrimitive, NumCast, Zero}; + pub use num_traits::{Float, NumCast, Zero}; #[cfg(not(feature = "cuda"))] pub type TestDevice = super::tensor::Cpu; diff --git a/dfdx/src/nn/layers/cos.rs b/dfdx/src/nn/layers/cos.rs index 3a7ccc7a..d8157d76 100644 --- a/dfdx/src/nn/layers/cos.rs +++ b/dfdx/src/nn/layers/cos.rs @@ -1,7 +1,7 @@ use crate::prelude::*; /// Calls [dfdx::tensor_ops::cos()]. -#[derive(Default, Debug, Clone, Copy, crate::CustomModule)] +#[derive(Default, Debug, Clone, Copy, CustomModule)] pub struct Cos; impl, T: Tape> Module> for Cos { type Output = Tensor; diff --git a/dfdx/src/nn/layers/exp.rs b/dfdx/src/nn/layers/exp.rs index 48d24384..91569df2 100644 --- a/dfdx/src/nn/layers/exp.rs +++ b/dfdx/src/nn/layers/exp.rs @@ -1,7 +1,7 @@ use crate::prelude::*; /// Calls [dfdx::tensor_ops::exp()]. -#[derive(Default, Debug, Clone, Copy, crate::CustomModule)] +#[derive(Default, Debug, Clone, Copy, CustomModule)] pub struct Exp; impl, T: Tape> Module> for Exp { type Output = Tensor; diff --git a/dfdx/src/nn/layers/leaky_relu.rs b/dfdx/src/nn/layers/leaky_relu.rs index a176b2e2..27ee7c21 100644 --- a/dfdx/src/nn/layers/leaky_relu.rs +++ b/dfdx/src/nn/layers/leaky_relu.rs @@ -1,7 +1,7 @@ use crate::prelude::*; /// ReLU but maintains a small gradient if the input values are negative. -#[derive(Debug, Clone, Copy, crate::CustomModule)] +#[derive(Debug, Clone, Copy, CustomModule)] pub struct LeakyReLU(pub f64); impl Default for LeakyReLU {