on master help sign in
Add another test
commiteb179d071be3d5c7027080bf266dacec632774eb authorHuw Campbell <huw.campbell@ambiata.com> dateThu 8 Dec 2016, 21:11 (10 years ago) parent24289db
1 file changed+11
test/Test/Grenade/Layers/Pooling.hs+11
test/Test/Grenade/Layers/Pooling.hs+11
@@ -21,6 +21,17 @@ prop_pool = once $
2121 out = poolForward 2 2 1 1 2 3 input
2222 in expected === out
2323
24+prop_pool_rectangular = once $
25+ let input = (3><4)
26+ [ 1.0, 14.0, 3.0, 4.0
27+ , 5.0, 6.0, 7.0, 8.0
28+ , 9.0, 10.0, 11.0, 12.0 ]
29+ expected = (2><2)
30+ [ 14.0, 14.0
31+ , 11.0, 12.0 ]
32+ out = poolForward 2 3 1 1 2 2 input
33+ in expected === out
34+
2435prop_pool_backwards = once $
2536 let input = (3><4)
2637 [ 1.0, 2.0, 3.0, 4.0