Closed abhi-glitchhg closed 1 year ago
I am assuming here that we are working with c-contiguous numpy arrays. 😄
There is some bug with current code where if the dilation shape is of type (n,m) where n!=m, the code breaks and exits without any warning/error. I need to find the reason and how to handle this issue properly.
Now that dilation and strides are working fine, I should try out to implement grouping of channels
Generally, the implementation of convolutions in numpy involves For loops. Generally, these implementations are a part of tutorials to understand the Convolution operation in Deep Learning/Image processing, but very rarely one talk about optimizing the convolution operation by leveraging the Powerful numpy APIs.
My current idea is to implement an optimized convolution operation using the as_strided function of the numpy library. Will try to implement it for different formats. eg channels first, channels last.
Also if possible, i will try to add dilations, and striding operations which are quite popular in Deep Learning frameworks like pytorch and Keras.