Encodec encoding demo. (#1775)

This commit is contained in:
Laurent Mazare
2024-02-28 06:49:03 +01:00
committed by GitHub
parent 15e8644149
commit d0aca6c3c6
2 changed files with 18 additions and 2 deletions

View File

@ -283,7 +283,8 @@ impl VectorQuantization {
}
pub fn encode(&self, xs: &Tensor) -> Result<Tensor> {
self.codebook.encode_slow(xs)
let xs = xs.transpose(1, 2)?;
self.codebook.encode_slow(&xs)
}
pub fn decode(&self, embed_ind: &Tensor) -> Result<Tensor> {