Last active
October 19, 2016 19:44
-
-
Save anilshanbhag/34262795bd989cf93d10297ea46ba838 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(a1:vec[float],a0:vec[vec[float]],a2:vec[float]) => | |
map( | |
zip( | |
a1, | |
map( | |
map( | |
a0, | |
(b:vec[float]) => | |
res( | |
for( | |
b, | |
vecBuilder[float](784), | |
(vb:vecBuilder[float],i:long,x:float) => | |
merge(vb,(x*lookup(a2,i))) | |
) | |
) | |
), | |
(a:vec[float]) => | |
agg( | |
a, | |
0.0F, | |
(cur:float,v:float) => | |
(cur+v), | |
(cur:float,v:float) => | |
(cur+v) | |
) | |
) | |
), | |
(a:{float,float}) => | |
(a.0-a.1) | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The shape of input vectors are
a0 [500]
a1 [500,784]
a2 [784]