-
Notifications
You must be signed in to change notification settings - Fork 19.4k
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 utility for weight visualization #20225
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #20225 +/- ##
==========================================
- Coverage 82.12% 79.26% -2.86%
==========================================
Files 501 502 +1
Lines 47440 47504 +64
Branches 8711 8725 +14
==========================================
- Hits 38958 37655 -1303
- Misses 6570 8086 +1516
+ Partials 1912 1763 -149
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Thanks for the PR! As for #19705, the main value would be to have an interactive, nice-looking HTML-based way to visualize the content of saved files and edit them. Visualizing weights is a separate problem, which we could leverage as part of the saved file visualizer, but it's not the main value there. If you want to add a weight visualizer, we should make it clear where the boundaries between different "slices" of weights are. Right now everything is a big 2D grid. We should have slice separators and some indicator of which axes the slices map to. But again, the main goal of #19705 is to see and edit the content of saved files interactively. Weight visualization is secondary. |
Ok, I understand your thought. So, How about using load_model and save_model method to load,edit and save the model attribute and weight rather than using directly handle savedModel format? |
It is not possible to load a model if it doesn't match your local code. You can only load it by modifying the saved file first. The formats to target are the |
Regarding the file inspection tool, I have added a utility for visualizing model weights. However, I believe it would be more versatile and widely applicable to implement this directly for models rather than focusing only on saved files. As a result, I have developed logic to display the model's weights using Matplotlib.
If it sounds good, I would like to propose integrating this functionality into plot_model, or perhaps creating a new utility method that accepts a model as a parameter.
here is my gist