original_docstring: 
          Get the latent space embedding (mean posterior value of z).
  
          :param ~torch.utils.data.Dataset dataset: The dataset to embed.
          :param int batch_size: Minibatch size (number of sequences). (Defaults
              to batch_size of the model object.)
          
docstring: Get the latent space embedding (mean posterior value of z).
docstring_tokens: Get the latent space embedding ( mean posterior value of z ) .
code: def embed(self, dataset, batch_size=None):
          """
          Get the latent space embedding (mean posterior value of z).
  
          :param ~torch.utils.data.Dataset dataset: The dataset to embed.
          :param int batch_size: Minibatch size (number of sequences). (Defaults
              to batch_size of the model object.)
          """
          if batch_size is None:
              batch_size = self.batch_size
          dataload = DataLoader(dataset, batch_size=batch_size, shuffle=False)
          with torch.no_grad():
              z_locs, z_scales = [], []
              for seq_data, L_data in dataload:
                  if self.is_cuda:
                      seq_data = seq_data.cuda()
                  z_loc, z_scale = self.encoder(seq_data)
                  z_locs.append(z_loc.cpu())
                  z_scales.append(z_scale.cpu())
  
          return torch.cat(z_locs), torch.cat(z_scales)
code_tokens: def embed ( self , dataset , batch_size = None ) : if batch_size is None : batch_size = self . batch_size dataload = DataLoader ( dataset , batch_size = batch_size , shuffle = False ) with torch . no_grad ( ) : z_locs , z_scales = [ ] , [ ] for seq_data , L_data in dataload : if self . is_cuda : seq_data = seq_data . cuda ( ) z_loc , z_scale = self . encoder ( seq_data ) z_locs . append ( z_loc . cpu ( ) ) z_scales . append ( z_scale . cpu ( ) ) return torch . cat ( z_locs ) , torch . cat ( z_scales )
short_docstring: Get the latent space embedding (mean posterior value of z).
short_docstring_tokens: Get the latent space embedding ( mean posterior value of z ) .
comment: """
          Get the latent space embedding (mean posterior value of z).
  
          :param ~torch.utils.data.Dataset dataset: The dataset to embed.
          :param int batch_size: Minibatch size (number of sequences). (Defaults
              to batch_size of the model object.)
          """