Allow model to accept AbstractVector{<:AbstractMillNode} so user wouldn't have to call model(reduce(catobs, x)) and could just call model(x) instead.
Add
using Zygote
(m::AbstractMillModel)(x::AbstractVector{<:AbstractMillNode}) = m(Zygote.@ignore(reduce(catobs, x)))
so reduction can be used in gradient computation.
Now it raises error and we don't need to derive through that, so we can stop gradient here and it simplifies the usage.
Allow model to accept
AbstractVector{<:AbstractMillNode}
so user wouldn't have to callmodel(reduce(catobs, x))
and could just callmodel(x)
instead.Add
so reduction can be used in gradient computation. Now it raises error and we don't need to derive through that, so we can stop gradient here and it simplifies the usage.