@@ -42,7 +42,7 @@ prop_im2col_c = once $
4242 , 5.0, 6.0, 9.0, 10.0
4343 , 6.0, 7.0, 10.0, 11.0
4444 , 7.0, 8.0, 11.0, 12.0 ]
45− out = im2col_c 2 2 1 1 input
45+ out = im2col 2 2 1 1 input
4646 in expected === out
4747
4848prop_im2col_stride = once $
@@ -68,7 +68,7 @@ prop_im2col_c_stride = once $
6868 , 3.0, 4.0, 7.0, 8.0
6969 , 5.0, 6.0, 9.0, 10.0
7070 , 7.0, 8.0, 11.0, 12.0 ]
71− out = im2col_c 2 2 1 2 input
71+ out = im2col 2 2 1 2 input
7272 in expected === out
7373
7474prop_im2col_other = once $
@@ -90,12 +90,12 @@ prop_im2col_c_other = once $
9090 expected = (2><6)
9191 [ 1.0, 2.0, 5.0, 6.0 , 9.0, 10.0
9292 , 3.0, 4.0, 7.0, 8.0 , 11.0 ,12.0 ]
93− out = im2col_c 3 2 1 2 input
93+ out = im2col 3 2 1 2 input
9494 in expected === out
9595
9696prop_im2col_bigger = once $
9797 let input = (7><7) [ 1.0 .. ]
98− in im2colUnsafe 5 5 2 2 input === im2col_c 5 5 2 2 input
98+ in im2colUnsafe 5 5 2 2 input === im2col 5 5 2 2 input
9999
100100-- If there's no overlap (stride is the same size as the kernel)
101101-- then col2im . im2col should be symmetric.
@@ -104,7 +104,7 @@ prop_im2col_sym_on_same_stride = once $
104104 [ 1.0, 2.0, 3.0, 4.0
105105 , 5.0, 6.0, 7.0, 8.0
106106 , 9.0, 10.0, 11.0, 12.0 ]
107− out = col2imUnsafe 3 2 3 2 3 4 . im2colUnsafe 3 2 3 2 $ input
107+ out = col2im 3 2 3 2 3 4 . im2colUnsafe 3 2 3 2 $ input
108108 in input === out
109109
110110-- If there's no overlap (stride is the same size as the kernel)
@@ -114,7 +114,7 @@ prop_im2colunsafe_sym_on_same_stride = once $
114114 [ 1.0, 2.0, 3.0, 4.0
115115 , 5.0, 6.0, 7.0, 8.0
116116 , 9.0, 10.0, 11.0, 12.0 ]
117− out = col2imUnsafe 3 2 3 2 3 4 . im2colUnsafe 3 2 3 2 $ input
117+ out = col2im 3 2 3 2 3 4 . im2colUnsafe 3 2 3 2 $ input
118118 in input === out
119119
120120
@@ -129,7 +129,7 @@ prop_im2col_col2im_additive = once $
129129 [ 1.0, 2.0, 2.0, 1.0
130130 , 2.0, 4.0, 4.0, 2.0
131131 , 1.0, 2.0, 2.0, 1.0 ]
132− out = col2imUnsafe 2 2 1 1 3 4 . im2colUnsafe 2 2 1 1 $ input
132+ out = col2im 2 2 1 1 3 4 . im2colUnsafe 2 2 1 1 $ input
133133 in expected === out
134134
135135prop_simple_conv_forwards = once $
@@ -207,7 +207,8 @@ prop_vid2col_no_stride = once $
207207 , 6.0, 7.0, 10.0, 11.0 , 26.0, 27.0, 30.0, 31.0
208208 , 7.0, 8.0, 11.0, 12.0 , 27.0, 28.0, 31.0, 32.0 ]
209209 out = vid2colUnsafe 2 2 1 1 3 4 input
210− in expected === out
210+ out_c = vid2col 2 2 1 1 3 4 input
211+ in expected === out .&&. expected === out_c
211212
212213prop_vid2col_stride = once $
213214 let input = [(3><4)
@@ -223,8 +224,9 @@ prop_vid2col_stride = once $
223224 , 3.0, 4.0, 7.0, 8.0 , 23.0, 24.0, 27.0, 28.0
224225 , 5.0, 6.0, 9.0, 10.0 , 25.0, 26.0, 29.0, 30.0
225226 , 7.0, 8.0, 11.0, 12.0 , 27.0, 28.0, 31.0, 32.0 ]
226− out = vid2colUnsafe 2 2 1 2 3 4 input
227− in expected === out
227+ out = vid2colUnsafe 2 2 1 2 3 4 input
228+ out_c = vid2col 2 2 1 2 3 4 input
229+ in expected === out .&&. expected === out_c
228230
229231prop_vid2col_invert = once $
230232 let input = [(3><4)
@@ -235,7 +237,7 @@ prop_vid2col_invert = once $
235237 [ 21.0, 22.0, 23.0, 24.0
236238 , 25.0, 26.0, 27.0, 28.0
237239 , 29.0, 30.0, 31.0, 32.0 ] ]
238− out = col2vidUnsafe 3 2 3 2 3 4 . vid2colUnsafe 3 2 3 2 3 4 $ input
240+ out = col2vid 3 2 3 2 3 4 . vid2colUnsafe 3 2 3 2 3 4 $ input
239241 in input === out
240242
241243