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

scaling #165

Open
castelao opened this issue Nov 20, 2023 · 2 comments
Open

scaling #165

castelao opened this issue Nov 20, 2023 · 2 comments

Comments

@castelao
Copy link
Collaborator

Is there already a solution to scale the input? I'm currently scaling my features manually before feeding into nf. It would be nice if we could incorporate such scaling in the nn definition to avoid mistakes. Would it make sense to create something like a normalizing/scaling layer? So we can pass two values - 'reference' and 'scale' - per feature to set_params().

@milancurcic
Copy link
Member

There's not and I agree there should be.

Do you think it's justified for it to be its own layer (rather than just a Fortran function)? At first thought it seems like overkill, but there may be good use cases. For example, if that's what popular frameworks do, it may be a good design choice to do the expected thing and provide it as a layer. Also, if there's any application that requires scaling anywhere inside the network (i.e. not for just input or output), then it definitely should be a layer.

(sorry for the delay with the testing and the review; getting around to it)

@castelao
Copy link
Collaborator Author

My motivation was to have a more robust and well-defined NN. I'm afraid of the situation when I re-calibrate an NN with a slightly different normalization and forget to update that step in the application. It doesn't need to be a layer by itself, but it would be nice to explicitly define the normalization that I'm using together with the other coefficients.

https://keras.io/api/layers/normalization_layers/

Don't worry about delaying the other PR. I've been running with my branch, so it's not holding me. Whenever it's ready, I'll flip to the official repo. And congrats on your new position, I can imagine how busy you've been.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants