mirror of
https://github.com/huggingface/candle.git
synced 2025-06-19 19:58:35 +00:00
Tensor mutability (#154)
* Working towards tensor mutability. * Use a ref-cell to provide tensor mutability.
This commit is contained in:
@ -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 {}",
|
||||
|
Reference in New Issue
Block a user