tuple sum

This commit is contained in:
Mike J Innes 2017-06-02 13:40:38 +01:00
parent 07c523a13d
commit 011449aa24

View File

@ -43,6 +43,7 @@ graph(::typeof(cat), dim::Integer, a...) = mx.Concat(a..., dim = dim)
graph(::typeof(vcat), a...) = graph(cat, 1, a...)
graph(::typeof(map), f, xss::Tuple...) = map(f, xss...)
graph(::typeof(sum), xs::Tuple) = reduce((a, b) -> graph(broadcast, +, a, b), xs)
graph(::Input, x) = x