Implement convolution operator in CNN step by step for ease of understanding, regardless of efficiency.
Currently including:
- conv2d_with_stride
- conv2d_with_stride_padding
- conv2d_with_stride_padding_dilation
- conv2d_with_stride_padding_dilation_groups
mode='plain'
: plain implementation.mode='im2col'
: useim2col
borrowed from Caffe andmatmul
implemented by ourselves.mode='im2col_v2'
: useim2col
borrowed from Caffe andnp.dot
.
We also compare the results of our implementions with Pytorch's.
- NumPy
- PyTorch
mkdir -p build
cmake ..
make
cd ..
python test.py