DrChainsaw / ONNXNaiveNASflux.jl

Import/export ONNX models
MIT License
44 stars 2 forks source link

Try to extract layer names from Chain, Parallel and SkipConnection #95

Closed DrChainsaw closed 3 months ago

DrChainsaw commented 3 months ago

Fixes #94

This adds functionality to extract layer names from Chain, Parallel and SkipConnection.

This functionality is enabled by default, meaning that if the model to be serialized is a Chain with named layers, ONNXNaiveNASflux will use those names instead of the default ones. The name hunting will recurse to any nested Chains and into Parallels and SkipConnections.

@alicewith: You can see some examples of what this does in the tests, starting here.

Note that the input node is a special node in ONNX which does not exist in a Flux Chain, so just naming the first layer "input" will not give you the result you want; You have to give the name as input to save just as on current master.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 97.14286% with 2 lines in your changes missing coverage. Please review.

Project coverage is 96.18%. Comparing base (63d5faf) to head (ad1de43).

Files Patch % Lines
src/serialize/namingutil.jl 93.54% 2 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #95 +/- ## ========================================== + Coverage 96.12% 96.18% +0.05% ========================================== Files 15 15 Lines 1109 1152 +43 ========================================== + Hits 1066 1108 +42 - Misses 43 44 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

alicewith commented 3 months ago

It looks good! Thank you.

DrChainsaw commented 3 months ago

Alright, just triggered the release process so it should be available soon.