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 {}
      )
      tx = transforms.Compose(
          [transforms.Resize([64, 64]), transforms.ToTensor()]
      )
      train_loader = torch.utils.data.DataLoader(
          datasets.ImageFolder("../data/cub/train", transform=tx),
          batch_size=batch_size,
          shuffle=shuffle,
          **kwargs,
      )
      test_loader = torch.utils.data.DataLoader(
          datasets.ImageFolder("../data/cub/test", transform=tx),
          batch_size=batch_size,
          shuffle=shuffle,
          **kwargs,
      )
      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 import datasets, transforms
  from torchvision.utils import make_grid, save_image
  from utils import Constants
  from vis import plot_embeddings, plot_kls_df
  from .vae import VAE
label_desc: Use image node_id 3 for calling the CUB_Image obj's underlying member method code with example usage: obj.getDataLoaders(batch_size, shuffle, device) and returns: train_loader,  test_loader