great, thanks! I was able to get what I want using this
import torch.nn.functional as F

image = torch.randn(1, 3, 240, 320)
image = F.pad(image, (ws // 2, ws // 2, ws // 2, ws // 2), mode='reflect')
patches = F.unfold(a, kernel_size=ws).view(1, 3, ws**2, 240, 320)