Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Add
@autosize
#2078Add
@autosize
#2078Changes from all commits
ac34df9
604f2b4
46e06c7
310b71e
537b011
b2016e2
e2ab1ec
67ea6a7
936bb5b
5c1ed68
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we force users to call
recursive_striplazy(model, input_size)
or something before using an incrementally constructed network like this? Maybe define arrule
which throws an error?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
striplazy
should be fully recursive. We could make a function that calls this afteroutputsize
& returns the model. And indeed anrrule
would be one way to forbid you not to strip the model before using it for real.I suppose the other policy would just be to allow these things to survive in the model. As long as you never change it, and don't care about the cost of the
if
& type instability, it should work?But any use outside of
@autosize
probably needs another macro... writingFlux.LazyLayer("", x -> Dense(size(x,1) => 10), nothing)
seems sufficiently obscure that perhaps it's OK to say that's obviously at own risk, for now?@autosize
can be the only API until we decide if we want more.