Skip to content

Don't use reader in ModelGraph and layers

Javier Duarte requested to merge github/fork/vloncar/dont_use_reader_in_model into main

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.

Merge request reports

Loading