forked from tracel-ai/burn
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing docs and enable missing_docs warn lint (tracel-ai#420)
- Loading branch information
Showing
73 changed files
with
696 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
#![allow(missing_docs)] | ||
|
||
mod add; | ||
mod aggregation; | ||
mod avgpool1d; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
The `burn-common` package hosts code that _must_ be shared between burn packages (with `std` or `no_std` enabled). No other code should be placed in this package unless unavoidable. | ||
# Burn Common | ||
|
||
The `burn-common` package hosts code that _must_ be shared between burn packages (with `std` or | ||
`no_std` enabled). No other code should be placed in this package unless unavoidable. | ||
|
||
The package must build with `cargo build --no-default-features` as well. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,18 @@ | ||
#![cfg_attr(not(feature = "std"), no_std)] | ||
#![warn(missing_docs)] | ||
|
||
//! # Burn Common Library | ||
//! | ||
//! This library contains common types used by other Burn crates that must be shared. | ||
/// Id module contains types for unique identifiers. | ||
pub mod id; | ||
|
||
/// Rand module contains types for random number generation for non-std environments and for | ||
/// std environments. | ||
pub mod rand; | ||
|
||
/// Stub module contains types for stubs for non-std environments and for std environments. | ||
pub mod stub; | ||
|
||
extern crate alloc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,24 @@ | ||
pub use crate::data::dataset::{Dataset, DatasetIterator}; | ||
use core::iter::Iterator; | ||
|
||
/// A progress struct that can be used to track the progress of a data loader. | ||
#[derive(Clone, Debug)] | ||
pub struct Progress { | ||
/// The number of items that have been processed. | ||
pub items_processed: usize, | ||
|
||
/// The total number of items that need to be processed. | ||
pub items_total: usize, | ||
} | ||
|
||
/// A data loader iterator that can be used to iterate over a data loader. | ||
pub trait DataLoaderIterator<O>: Iterator<Item = O> { | ||
/// Returns the progress of the data loader. | ||
fn progress(&self) -> Progress; | ||
} | ||
|
||
/// A data loader that can be used to iterate over a dataset. | ||
pub trait DataLoader<O> { | ||
/// Returns a boxed [iterator](DataLoaderIterator) to iterate over the data loader. | ||
fn iter<'a>(&'a self) -> Box<dyn DataLoaderIterator<O> + 'a>; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.