class_docstr: Split the input vector into groups and apply FSQ on each group separately.
  This class is for convenience. Since FSQ is applied on each group separately,
  groups can be defined arbitrarily by splitting the input vector. However, this
  class makes it easy to construct several groups with the same quantization num_levels.
  
  Args:
      num_groups: number of groups to split the input into, each group will be quantized separately using num_codebooks//num_groups codebooks
      codebook_dim: embedding dimension, will be split into num_groups
      **kwargs: parameters of FiniteScalarQuantizer
  
  References:
      Yang et al, HiFi-Codec: Group-residual Vector quantization for High Fidelity Audio Codec, 2023 (http://arxiv.org/abs/2305.02765).
class_docstr_tok: ["Split","the","input","vector","into","groups","and","apply","FSQ","on","each","group","separately",".","This","class","is","for","convenience",".","Since","FSQ","is","applied","on","each","group","separately",",","groups","can","be","defined","arbitrarily","by","splitting","the","input","vector",".","However",",","this","class","makes","it","easy","to","construct","several","groups","with","the","same","quantization","num_levels",".","Args",":","num_groups",":","number","of","groups","to","split","the","input","into",",","each","group","will","be","quantized","separately","using","num_codebooks\/\/num_groups","codebooks","codebook_dim",":","embedding","dimension",",","will","be","split","into","num_groups","*","*","kwargs",":","parameters","of","FiniteScalarQuantizer","References",":","Yang","et","al",",","HiFi-Codec",":","Group-residual","Vector","quantization","for","High","Fidelity","Audio","Codec",",","2023","(","http",":","\/\/arxiv.org\/abs\/2305.02765",")","."]
docstr: Input indices are split into groups, each group is decoded separately, then the results are concatenated.
          
docstr_tok: ["Input","indices","are","split","into","groups",",","each","group","is","decoded","separately",",","then","the","results","are","concatenated","."]
code: def decode(
      self, indices: torch.Tensor, input_len: torch.Tensor
  ) -> torch.Tensor:
      """Input indices are split into groups, each group is decoded separately, then the results are concatenated."""
      indices_grouped = indices.chunk(self.num_groups, dim=0)
      dequantized = []
  
      for indices_group, fsq_group in zip(indices_grouped, self.fsqs):
          dequantized_group = fsq_group.decode(
              indices=indices_group, input_len=input_len
          )
          dequantized.append(dequantized_group)
  
      # concatenate along the feature dimension
      dequantized = torch.cat(dequantized, dim=1)
  
      return dequantized
  
imports: from typing import List, Optional, Tuple
  import torch
  import torch.nn
  from einops import rearrange
  from nemo.collections.asr.parts.utils.activations import Snake
  from nemo.collections.tts.parts.utils.helpers import mask_sequence_tensor
  from nemo.core.classes.common import typecheck
  from nemo.core.classes.module import NeuralModule
  from nemo.core.neural_types.elements import EncodedRepresentation, Index, LengthsType, VoidType
  from nemo.core.neural_types.neural_type import NeuralType
  from nemo.utils import logging
label_desc: Use image node_id 9 for calling the GroupFiniteScalarQuantizer obj's underlying member method code with example usage: obj.decode(indices, input_len) and returns: dequantized