docstr: make sure raw data is always passed as dim=2 to avoid argmax.
  last dimension must always be word embedding.
docstr_tok: ["make","sure","raw","data","is","always","passed","as","dim=2","to","avoid","argmax",".","last","dimension","must","always","be","word","embedding","."]
code: def _sent_preprocess(self, sentences):
      """make sure raw data is always passed as dim=2 to avoid argmax.
      last dimension must always be word embedding."""
      if len(sentences.shape) > 2:
          sentences = sentences.argmax(-1).squeeze()
      return [
          self.vaes[1].fn_trun(s) for s in self.vaes[1].fn_2i(sentences)
      ]
  
imports: import matplotlib.pyplot
  import torch.distributions
  import torch.nn
  import torch.nn.functional
  import torch.utils.data
  from numpy import sqrt, prod
  from torch.utils.data import DataLoader
  from torchnet.dataset import TensorDataset, ResampleDataset
  from torchvision.utils import save_image, make_grid
  from utils import Constants
  from vis import plot_embeddings, plot_kls_df
  from .mmvae import MMVAE
  from .vae_cub_image_ft import CUB_Image_ft
  from .vae_cub_sent_ft import CUB_Sentence_ft
label_desc: Use image node_id 7 for calling the CUB_Image_Sentence_ft obj's underlying member method code with example usage: obj._sent_preprocess(sentences) and returns: unknown