Single-argument Flux.outdims
for layers with fixed output dimension?
#1266
Labels
Flux.outdims
for layers with fixed output dimension?
#1266
As of #1252 calls to
Flux.outdims(l::Dense, isize)
check thatisize
machtes the input dimension of the dense layer. I appreciate this check and think it is the right thing to do ifisize
is provided.However, as the
Dense
layer has fixed input and output dimensions it might be convenient to also provide a single-argumentoutdims
method (there are probably also other layers that would benefit from this). Of course, users could also directly check for the dimensions of the weightsl.W
to figure this out but field access feels like a rather unsafe way to achieve this since the field names are implementation details that may change.While we are at it, it may also be useful to add
Flux.indims
for those fixed-dimension layers.If this sounds like a useful addition, I am happy to create a PR.
The text was updated successfully, but these errors were encountered: