Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Single-argument Flux.outdims for layers with fixed output dimension? #1266

Open
lassepe opened this issue Jul 3, 2020 · 1 comment
Open

Comments

@lassepe
Copy link
Contributor

lassepe commented Jul 3, 2020

As of #1252 calls to Flux.outdims(l::Dense, isize) check that isize machtes the input dimension of the dense layer. I appreciate this check and think it is the right thing to do if isize is provided.

However, as the Dense layer has fixed input and output dimensions it might be convenient to also provide a single-argument outdims method (there are probably also other layers that would benefit from this). Of course, users could also directly check for the dimensions of the weights l.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.

@AliMalik9599
Copy link

Hi @CarloLucibello, I am interested in working on enhancing this feature. I'm relatively new to Julia, any advice on getting started? Thanks!

@gxyd gxyd mentioned this issue Dec 26, 2020
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants