Skip to content

Commit

Permalink
Proper clippy fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
LaurentMazare committed Jun 18, 2024
1 parent c5b1f2e commit 465a94c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
1 change: 0 additions & 1 deletion candle-examples/examples/vgg/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ pub fn main() -> anyhow::Result<()> {
.to_vec1::<f32>()?;

// Sort the predictions and take the top 5
#[allow(clippy::unused_enumerate_index)]
let mut top: Vec<_> = prs.iter().enumerate().collect();
top.sort_by(|a, b| b.1.partial_cmp(a.1).unwrap());
let top = top.into_iter().take(5).collect::<Vec<_>>();
Expand Down
3 changes: 1 addition & 2 deletions candle-transformers/src/models/vgg.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ impl ModuleT for Vgg<'_> {
fn conv2d_block(convs: &[(usize, usize, &str)], vb: &VarBuilder) -> Result<FuncT<'static>> {
let layers = convs
.iter()
.enumerate()
.map(|(_, &(in_c, out_c, name))| {
.map(|&(in_c, out_c, name)| {
candle_nn::conv2d(
in_c,
out_c,
Expand Down

0 comments on commit 465a94c

Please sign in to comment.