Fix loading weights in GarNetStacked and GarNet internal array precisions #827
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.
Description
In the change from using the reader to storing weights as attributes, GarNetStack input feature weights + biases and output feature weights were missed. Fixed by storing all GarNetStack weights/biases as attributes.
All non default precisions specified for internal GarNet arrays (edge weight, norm, etc.) were not converted to CPP definitions, and produced typedef errors in
firmware/parameters.h
. Fixed by applying an APTypeConverter to all internal array precisions, not just those with default values.Modified
contrib/garnet.py
to include an output activation for GarNetStack models, which was necessary to test above changes. This had previously been commented out due to being unused.Type of change
Tests
Added test similar to pre-existing in
test_garnet.py
for GarNetStack modelsChecklist
pre-commit
on the files I edited or added.