summaryrefslogtreecommitdiff
path: root/candle-examples
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-12-28 20:26:20 +0100
committerGitHub <noreply@github.com>2023-12-28 20:26:20 +0100
commit1e442d4bb90cf9d16158ef48a596828c586b1fde (patch)
tree7fb713835a92aec47720a10b9b423e8c2b48c98b /candle-examples
parentcd889c0f8a0a4aecd5ed6268a12394cd2462c202 (diff)
downloadcandle-1e442d4bb90cf9d16158ef48a596828c586b1fde.tar.gz
candle-1e442d4bb90cf9d16158ef48a596828c586b1fde.tar.bz2
candle-1e442d4bb90cf9d16158ef48a596828c586b1fde.zip
Fix lints for clippy 1.75. (#1494)
Diffstat (limited to 'candle-examples')
-rw-r--r--candle-examples/examples/musicgen/musicgen_model.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/examples/musicgen/musicgen_model.rs b/candle-examples/examples/musicgen/musicgen_model.rs
index dc8c3667..c6b52fde 100644
--- a/candle-examples/examples/musicgen/musicgen_model.rs
+++ b/candle-examples/examples/musicgen/musicgen_model.rs
@@ -321,7 +321,7 @@ impl MusicgenDecoder {
let positions = self.embed_positions.forward(&input)?.to_device(dev)?;
let mut xs = inputs_embeds.broadcast_add(&positions)?;
let attention_mask = self.prepare_decoder_attention_mask(b_sz, seq_len)?;
- for (_layer_idx, decoder_layer) in self.layers.iter_mut().enumerate() {
+ for decoder_layer in self.layers.iter_mut() {
xs = decoder_layer.forward(&xs, &attention_mask, None)?;
}
let xs = self.layer_norm.forward(&xs)?;