I recently had to work with PyTorch’s Col2Im and Im2Col functions, and I found that Col2Im currently supports only 3D and 4D input.
I think it would be great if Col2Im could be extended to support 5D input, and in case the maintainers agree with me, I would be really happy to go ahead and open an issue to track progress, and implement 5D support myself.
Any thoughts on this? Would it be alright if I open an issue?
No, I mean that along with of 2-d output_size and 2-d kernel_size, we support 3-d output_size, and 3-d kernel_size, too.
I am not sure if that would be adding an additional batch dimension?
I apologise if what I am saying is not clear, if you need more clarification, I would be happy to provide an example, too. Thanks!
That is a great way to go forward, but my thought was that as there is already an iterative implementation of Col2Im(that uses for loops), we could extend that itself to support 5D images.
This code in the Onnx Col2Im reference implementation is similar to what I had in mind:
The implementation in Felix Dangel’s library(the one that you mentioned) would in my opinion be difficult to integrate in the existing implementation of Col2Im, because of its use of torch functions on whole tensors, instead of the use of indexing.
Hi @soulitzer! Just a gentle ping. Could you have a look at the issue when you find time? (Linked above).
I’ll then go ahead and start the implementation once we are able to decide if we would want to upstream the existing implementation or I should extend the current one.