Is there a im2col op like caffe in pytorch?


I need to implement a segmentation-aware conv operation, which means during conv, the weights of the filter is multiplied by a local segmentation-aware weights.
As the weights are different in different location, i need to unfold the image conv to act like matrix multiplcation.


you could either use torch.unfold from pytorch or im2col/col2im from


will unfold support dilated spacing in future? with which the dilated convolution can be implemented too.