with four parametrized types. This is followed by the function
function (d::Dense{false})(x::AbstractVecOrMat, ps, st::NamedTuple)
return d.activation.(ps.weight * x), st
end
I notice that in this function, Dense has only a single slot filled among the four: the first one. I have not seen a mention in the documentation that a struct could be referred to using only a subset of types. How should this be interpreted? I can assume that the other types remain arbitrary, so this is a specialization.
In that case, what if I’d like to specialize only the second type?