.Fluxautosizefor
function defined in module
Flux
autosizefor(::Type, x)
If an
_ in your layer's constructor, used within
@autosize, should
not mean the 2nd-last dimension, then you can overload this.
For instance
autosizefor(::Type{<:Dense}, x::AbstractArray) = size(x, 1) is needed to make
@autosize (2,3,4) Dense(_ => 5) return
Dense(2 => 5) rather than
Dense(3 => 5).
There are
4
methods for Flux.autosizefor:
The following page links back here: