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

Add multi-label classification dataset and metric #1572

Merged
merged 11 commits into from
Apr 5, 2024
Prev Previous commit
Next Next commit
Fix clippy suggestions
  • Loading branch information
laggui committed Apr 3, 2024
commit 32c8ebf3627da00ed0ac1a856f5314abc831b69c
2 changes: 1 addition & 1 deletion crates/burn-dataset/src/vision/image_folder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ impl AnnotationRaw {

fn decode(annotation: &[u8]) -> Self {
let (annotation, _): (AnnotationRaw, usize) =
bincode::serde::decode_from_slice(&annotation, Self::bin_config()).unwrap();
bincode::serde::decode_from_slice(annotation, Self::bin_config()).unwrap();
annotation
}
}
Expand Down
7 changes: 4 additions & 3 deletions crates/burn-train/src/metric/hamming.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ impl<B: Backend> HammingScore<B> {

/// Creates a new metric instance with default values.
fn default() -> Self {
let mut instance: Self = Default::default();
instance.threshold = 0.5;
instance
Self {
threshold: 0.5,
..Default::default()
}
}
}

Expand Down
Loading