summaryrefslogtreecommitdiff
path: root/candle-examples/examples/musicgen/encodec_model.rs
diff options
context:
space:
mode:
authorLaurent Mazare <laurent.mazare@gmail.com>2023-07-13 11:04:40 +0100
committerGitHub <noreply@github.com>2023-07-13 11:04:40 +0100
commit50b0946a2dff2a65f8319ff6d798f12b2ea2a6fb (patch)
treec48c4ecc686748e10b678d347af8d46cb0955a6c /candle-examples/examples/musicgen/encodec_model.rs
parenta3663ce2f2b03263075099baed677340974b7f4c (diff)
downloadcandle-50b0946a2dff2a65f8319ff6d798f12b2ea2a6fb.tar.gz
candle-50b0946a2dff2a65f8319ff6d798f12b2ea2a6fb.tar.bz2
candle-50b0946a2dff2a65f8319ff6d798f12b2ea2a6fb.zip
Tensor mutability (#154)
* Working towards tensor mutability. * Use a ref-cell to provide tensor mutability.
Diffstat (limited to 'candle-examples/examples/musicgen/encodec_model.rs')
-rw-r--r--candle-examples/examples/musicgen/encodec_model.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/candle-examples/examples/musicgen/encodec_model.rs b/candle-examples/examples/musicgen/encodec_model.rs
index f9b883fe..2ef6f20f 100644
--- a/candle-examples/examples/musicgen/encodec_model.rs
+++ b/candle-examples/examples/musicgen/encodec_model.rs
@@ -180,7 +180,7 @@ impl EncodecResidualVectorQuantizer {
}
fn decode(&self, codes: &Tensor) -> Result<Tensor> {
- let mut quantized_out = Tensor::zeros((), DType::F32, &codes.device())?;
+ let mut quantized_out = Tensor::zeros((), DType::F32, codes.device())?;
if codes.dim(0)? != self.layers.len() {
anyhow::bail!(
"codes shape {:?} does not match the number of quantization layers {}",