-
Notifications
You must be signed in to change notification settings - Fork 17
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 preliminary Metalhead.jl integration #208
Conversation
first attempt Metalhead integration (with hack); tests lacking minor add docstring comment rm invalidated test mv metalhead stuff out to separate src file add show methods for Metalhead wraps add forgotten files with tests fix test rename metal -> image_builder
Codecov Report
@@ Coverage Diff @@
## dev #208 +/- ##
==========================================
- Coverage 93.22% 92.73% -0.49%
==========================================
Files 9 11 +2
Lines 251 303 +52
==========================================
+ Hits 234 281 +47
- Misses 17 22 +5
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
I am not familiar with MLJFlux's code base, but as far as I can see, this looks okay. We can provide the syntax requested in the comments from the Metalhead side. |
That's great. Thanks for taking a look. |
Nightly fail looks unrelated. |
edited To change syntax from
image_builder(constructor)(args...; kwargs...)
toimage_builder(constructor, args...; kwargs...)
This PR replaces #206.
This PR fixes #162 but does so by preparing for Metalhead.jl integration (#205 ) and should be reviewed with that in mind. Full integration is not possible before FluxML/Metalhead.jl#176 is resolved.
Specifically, this PR:
image_builder
(docstring below)VGGHack
forMetalhead.VGG
as a workaround for Addinchannels
,imsize
,nclasses
as kwargs for all constructors Metalhead.jl#176, which is used as the default builder inImageClassifier
, to resolve Define a working default Flux chain builder forImageClassifier
#162.Steps for completing the integration are given in comments in the new code.
Docstring
Return an MLJFlux builder object based on the Metalhead.jl constructor/type
constructor
(eg,Metalhead.ResNet
). Hereargs
andkwargs
arepassed to the
MetalheadType
constructor at "build time", along withthe extra keyword specifiers
imsize=...
,inchannels=...
andnclasses=...
, with values inferred from the data.Example
If in Metalhead.jl you would do
then in MLJFlux, it suffices to do
which can be used in
ImageClassifier
as in@darsnack Any chance of a review in the next few weeks?