-
-
Notifications
You must be signed in to change notification settings - Fork 66
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
Abstract type for the models #183
Comments
@darsnack @ToucheSir what do you make of this proposal? This might reduce code duplication if we could write the methods for just the |
I think having an abstract type that's used internally to remove duplication is fine (though I think you really only remove the forward pass and maybe |
Also
Yeah I think that we can state that explicitly in the docs, shouldn't be a problem. I'll wait on FluxML/Flux.jl#1932 to be resolved before I get this in I think |
Funny, I can't seem to remove |
How are you trying to do it? By using the macro? That won't work. You need to define the function |
Given that all the high-level model APIs implement
(m::Model)(x)
,backbone(m::Model)
andclassifier(m::Model)
, would it make sense to have an abstract typeMetalheadModel
that the models can subtype? I take it that there's no way to implement an interface for these functions that can be inherited via types but this way at least we can document in the documentation forMetalheadModel
what every single model in the repo implementsThe text was updated successfully, but these errors were encountered: