Skip to content

Commit

Permalink
Merge pull request #49 from delta-rs/48-tests-still-failing
Browse files Browse the repository at this point in the history
  • Loading branch information
mjovanc authored Dec 5, 2024
2 parents 1882b51 + c1d310f commit 84ad987
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 40 deletions.
13 changes: 0 additions & 13 deletions delta/src/data/mnist.rs
Original file line number Diff line number Diff line change
Expand Up @@ -402,19 +402,6 @@ impl DatasetOps for MnistDataset {
}

/// Shuffles the dataset.
///
/// # Example
///
/// ```
/// use deltaml::common::DatasetOps;
/// use deltaml::data::MnistDataset;
///
/// #[tokio::main]
/// async fn main() {
/// let mut mnist_dataset = MnistDataset::load_train().await;
/// mnist_dataset.shuffle();
/// }
/// ```
fn shuffle(&mut self) {
let shuffle_data = |dataset: &mut Dataset| {
let num_samples = dataset.inputs.shape()[0];
Expand Down
27 changes: 0 additions & 27 deletions delta/src/neuralnet/models/sequential.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,33 +112,6 @@ impl Sequential {
/// # Returns
///
/// None
///
/// # Example
///
/// ```rust
/// use deltaml::activations::{ReluActivation, SoftmaxActivation};
/// use deltaml::common::DatasetOps;
/// use deltaml::data::MnistDataset;
/// use deltaml::losses::CrossEntropyLoss;
/// use deltaml::neuralnet::{Dense, Sequential};
/// use deltaml::optimizers::Adam;
///
/// #[tokio::main]
/// async fn main() {
/// let mut model = Sequential::new()
/// .add(Dense::new(128, Some(ReluActivation::new()), true))
/// .add(Dense::new(10, None::<SoftmaxActivation>, false));
///
/// let optimizer = Adam::new(0.001);
/// let loss = CrossEntropyLoss::new();
///
/// model.compile(optimizer, loss);
///
/// let mut train_data = MnistDataset::load_train().await;
///
/// model.fit(&mut train_data, 10, 32);
/// }
/// ```
pub fn fit<D: DatasetOps>(&mut self, train_data: &mut D, epochs: i32, batch_size: usize) {
self.ensure_optimizer_and_loss();

Expand Down

0 comments on commit 84ad987

Please sign in to comment.