im2col.py filter_to_2d filter matrix -> 2d matrix data_to_2d NCHW image matrix -> 2d matrix filter2d_to_orig filter (2d matrix) -> original filter data2d_to_orig image (2d matrix) -> NCHW image matrix to perform convolution: filter2d * data2d Test $ python im2col.py -v