How to extract the images patches from the feature maps after convolution operation?

Hi all
I don’t know how to extract the images patches from the feature maps after convolution operation in forward propagation. Because, I want to use this images patches to do some operations.
I know that this operation which extract the images patches is to use the function such as tf.image.extract_image_patches in Tensorflow , but I can’t find the similar function in Pytorch.

So… Could you tell me how to extract the images patches in Pytorch? Thanks!

Hello,

You could return the feature maps in forward pass, and use torch.Tensor.unfold to extract the images patches.

Thanks for your reply! Your suggestions are really helpful.

I am facing the same problem. Were you able to figure out how to do this?