Probably easiest to define predict(m, x) = predict(typeof(m.layers[end]), m, x)
and write dispatches for e.g. predict(::Type{<:Dense}, m, x) = [...]
1 Like
Probably easiest to define predict(m, x) = predict(typeof(m.layers[end]), m, x)
and write dispatches for e.g. predict(::Type{<:Dense}, m, x) = [...]