class_docstr: Derive a specific sub-class of a VAE for a CNN sentence model. 
class_docstr_tok: ["Derive","a","specific","sub-class","of","a","VAE","for","a","CNN","sentence","model","."]
code: def getDataLoaders(self, batch_size, shuffle=True, device="cuda"):
      kwargs = (
          {"num_workers": 1, "pin_memory": True}
          if device == "cuda"
          else {}
      )
  
      train_dataset = CUBImageFt("../data", "train", device)
      test_dataset = CUBImageFt("../data", "test", device)
      train_loader = torch.utils.data.DataLoader(
          train_dataset,
          batch_size=batch_size,
          shuffle=shuffle,
          **kwargs,
      )
      test_loader = torch.utils.data.DataLoader(
          test_dataset, batch_size=batch_size, shuffle=shuffle, **kwargs
      )
  
      train_dataset._load_data()
      test_dataset._load_data()
      self.unproject = (
          lambda emb_h, search_split="train", te=train_dataset.ft_mat, td=train_dataset.data_mat, se=test_dataset.ft_mat, sd=test_dataset.data_mat: NN_lookup(
              emb_h, te, td
          )
          if search_split == "train"
          else NN_lookup(emb_h, se, sd)
      )
  
      return train_loader, test_loader
  
imports: import torch
  import torch.distributions
  import torch.nn
  import torch.nn.functional
  import torch.utils.data
  from numpy import sqrt
  from torchvision.utils import make_grid, save_image
  from datasets import CUBImageFt
  from utils import Constants, NN_lookup
  from vis import plot_embeddings, plot_kls_df
  from .vae import VAE
label_desc: Use image node_id 3 for calling the CUB_Image_ft obj's underlying member method code with example usage: obj.getDataLoaders(batch_size, shuffle, device) and returns: train_loader,  test_loader