Figured it out -
import numpy as np
from sklearn.datasets import load_sample_images
import matplotlib.pyplot as plt
import torch
import torch.nn as nn
import torchvision.transforms as transforms

def random_crop(imgs, out=84):


    imgs = torch.tensor(imgs)
    change = torch.nn.Sequential(
        transforms.RandomCrop(84)
    )
    imgs = change(imgs).numpy()
    return imgs

dataset = load_sample_images()
first_img_data = dataset.images[0]
first_img_data  = first_img_data.reshape(-1, 427, 640)
first_img_data = first_img_data[1, :, :]
foo = random_crop(first_img_data.reshape(-1,1,427, 640), out=84)
plt.imshow(np.squeeze(foo))
plt.show()