on master help sign in
Replace dodgy sequence
commita29afe86039f7d44c6e074b0e45d06134d2ea394 authorHuw Campbell <huw.campbell@ambiata.com> dateFri 9 Dec 2016, 09:17 (10 years ago) parenteb179d0
1 file changed+1−2
src/Grenade/Layers/Internal/Convolution.hs+1−2
src/Grenade/Layers/Internal/Convolution.hs+1−2
@@ -175,8 +175,7 @@ fittingStarts :: Int -> Int -> Int -> Int -> Int -> Int -> [(Int,Int)]
175175fittingStarts nrows kernelrows steprows ncols kernelcols stepcolsh =
176176 let rs = fittingStart nrows kernelrows steprows
177177 cs = fittingStart ncols kernelcols stepcolsh
178− ls = sequence [rs, cs]
179− in fmap (\[a,b] -> (a,b)) ls
178+ in concatMap ( \r -> fmap (\c -> (r , c)) cs ) rs
180179
181180-- | Returns the starting sub vector which fit inside the larger vector for the
182181-- convolution. Takes into account the stride and kernel size.