Solved by ptrblck in post #8 
              
              
                I’m not sure why the method is called extract_image_patches if you won’t get the patches, but apparently a view of [batch_size, height, width, channels*kernel_height*kernel_width]. 
However, this code should yield the same result in PyTorch: 
import torch
import torch.nn.functional as F

batch_size …