Skip to content

Commit

Permalink
Fixing prelude/exports
Browse files Browse the repository at this point in the history
  • Loading branch information
coreylowman committed Oct 25, 2023
1 parent 25c7ef0 commit 341ee78
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion dfdx-core/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 1 addition & 4 deletions dfdx/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,6 @@

pub mod nn;

pub use dfdx_core::*;
pub use dfdx_derives::*;

pub use dfdx_core::*;

pub mod prelude {
Expand All @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion dfdx/src/nn/layers/cos.rs
Original file line number Diff line number Diff line change
@@ -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<S: Shape, E: Dtype, D: Device<E>, T: Tape<E, D>> Module<Tensor<S, E, D, T>> for Cos {
type Output = Tensor<S, E, D, T>;
Expand Down
2 changes: 1 addition & 1 deletion dfdx/src/nn/layers/exp.rs
Original file line number Diff line number Diff line change
@@ -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<S: Shape, E: Dtype, D: Device<E>, T: Tape<E, D>> Module<Tensor<S, E, D, T>> for Exp {
type Output = Tensor<S, E, D, T>;
Expand Down
2 changes: 1 addition & 1 deletion dfdx/src/nn/layers/leaky_relu.rs
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down

0 comments on commit 341ee78

Please sign in to comment.