Don't use reader in ModelGraph and layers
Created by: vloncar
Description
Currently, adding weights data happens during initialization of layers by using the supplied reader. This is a relic of old design that required splitting this from converter. Upcoming ONNX support and nested model require this step to be done during conversion. This PR removes reader from ModelGraph
and its subsequent use to read weights data. This is now moved to converters themselves and weights data is available as an attribute.
Type of change
-
(not exactly) New feature (non-breaking change which adds functionality)
Tests
This just changes the existing functionality so existing tests should verify that it works as expected
Checklist
-
I have read the guidelines for contributing. -
I have commented my code, particularly in hard-to-understand areas. -
I have made corresponding changes to the documentation. -
My changes generate no new warnings. -
I have installed and run pre-commit
on the files I edited or added.