diff options
author | Laurent Mazare <laurent.mazare@gmail.com> | 2023-07-13 11:04:40 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-07-13 11:04:40 +0100 |
commit | 50b0946a2dff2a65f8319ff6d798f12b2ea2a6fb (patch) | |
tree | c48c4ecc686748e10b678d347af8d46cb0955a6c /candle-examples/examples/musicgen/encodec_model.rs | |
parent | a3663ce2f2b03263075099baed677340974b7f4c (diff) | |
download | candle-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.rs | 2 |
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 {}", |