code: def create_dataloaders():
      # CV Data Pipelines
      #
      # Computer Vision task often needs a data processing pipeline that sometimes constitutes a
      # non-trivial part of the whole training pipeline.
      # BigDL-Nano can accelerate computer vision data pipelines.
      #
      # BigDL-Nano can accelerate computer vision data pipelines
      # by providing a drop-in replacement of torch_vision’s datasets and transforms
      #
      from bigdl.nano.pytorch.vision import transforms
      from bigdl.nano.pytorch.vision.datasets import OxfordIIITPet
  
      train_transform = transforms.Compose(
          [
              transforms.Resize(256),
              transforms.RandomCrop(224),
              transforms.RandomHorizontalFlip(),
              transforms.ColorJitter(brightness=0.5, hue=0.3),
              transforms.ToTensor(),
              transforms.Normalize(
                  [0.485, 0.456, 0.406], [0.229, 0.224, 0.225]
              ),
          ]
      )
      val_transform = transforms.Compose(
          [
              transforms.Resize(256),
              transforms.CenterCrop(224),
              transforms.ToTensor(),
              transforms.Normalize(
                  [0.485, 0.456, 0.406], [0.229, 0.224, 0.225]
              ),
          ]
      )
  
      # Apply data augmentation to the tarin_dataset
      train_dataset = OxfordIIITPet(
          root="/tmp/data", transform=train_transform, download=True
      )
      val_dataset = OxfordIIITPet(
          root="/tmp/data", transform=val_transform
      )
  
      # obtain training indices that will be used for validation
      indices = torch.randperm(len(train_dataset))
      val_size = len(train_dataset) // 4
      train_dataset = torch.utils.data.Subset(
          train_dataset, indices[:-val_size]
      )
      val_dataset = torch.utils.data.Subset(
          val_dataset, indices[-val_size:]
      )
  
      # prepare data loaders
      train_dataloader = DataLoader(train_dataset, batch_size=32)
      val_dataloader = DataLoader(val_dataset, batch_size=32)
  
      return train_dataloader, val_dataloader
  
file_path: BigDL/python/nano/tutorial/training/pytorch/pytorch_cv_data_pipeline.py
imports: import torch
  from torch import nn
  from torch.utils.data import DataLoader
  from torchvision.models import resnet18
  from bigdl.nano.pytorch import TorchNano
label_desc: Use image node_id 1 for calling a global function with example usage: create_dataloaders() and returns: train_dataloader,  val_dataloader