But I’m only considering Float type, so can how can I call this function? Something like THNN_Float_im2col?
Are there any header files I need to import?
from greping through the pytorch source, I would seem that there is no header with the col2im definition, so you would need to add that somewhere and it might not be considered part of the official api…
In the library, the function is THNN_Floatcol2im
(says objdump -t torch/lib/build/THNN/libTHNN.so.1 | grep col2im).
Thanks!
So what you mean is that I need to declare it in my code and link to libThNN.so.1 right?
Also can you tell the full definition from the lib file (void THNN_Floatcol2im?, what are the parameters included )?
You can use the one from SpatialFullConvolution.c after substituting real–>float (if it took THTensor_ you would need to expand that, too, but it seems to take the float* buffers.
static void THNN_Floatim2col(const float* data_im, const int channels,
const int height, const int width, const int kernel_h, const int kernel_w,
const int pad_h, const int pad_w,
const int stride_h, const int stride_w,
const int dilation_h, const int dilation_w,
float* data_col);
or so (by literally copying the declaration in the file and substituting).
From the message, you seem to have an extra underscore somewhere.
Sorry, I was outdated by a week…
The commit seems to remove it. I don’t know whether it will be in the .so on master, but I would have doubts.
But you might be able to get it with pytorch 0.2.
hi
I recently implemented a convolution with the PyTorch extension here and the code is based on here.
It is worth mentioning that the convolution achieved by PyTorch is very inefficient: