Skip to content
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

Recurrent netx save and load #324

Merged
merged 8 commits into from
Jul 8, 2024
Merged

Conversation

timcheck
Copy link
Contributor

@timcheck timcheck commented Jun 12, 2024

Issue Number: #327

Objective of pull request: As a user, I want to be able to save and load dense recurrent networks from lava-dl into lava.

Pull request checklist

Your PR fulfills the following requirements:

  • Issue created that explains the change and why it's needed
  • Tests are part of the PR (for bug fixes / features)
  • Docs reviewed and added / updated if needed (for bug fixes / features)
  • PR conforms to Coding Conventions
  • PR applys BSD 3-clause or LGPL2.1+ Licenses to all code files
  • Lint (flakeheaven lint src/lava tests/) and (bandit -r src/lava/.) pass locally
  • Build tests (pytest) passes locally

Pull request type

Please check your PR type:

  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation changes
  • Other (please describe):

What is the current behavior?

Cannot save/load recurrent network with NetX.

What is the new behavior?

A new hdf5 layer category for dense recurrent layers allows saving recurrent networks to an hdf5 file.

NetX can load into Lava a recurrent network from an hdf5 file.

A unit test shows example usage. An example 2-layer 5-neuron dense recurrent network is created in Lava-dl, saved to a hdf5 file, and loaded into Lava from the hdf5 file. The network is run in both Lava-dl and Lava on an example input to confirm matching activity level within an error margin of 2%.

Does this introduce a breaking change?

  • Yes
  • No

timcheck added 3 commits June 12, 2024 21:41
Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
…viously for recurrent nets

Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
@timcheck timcheck requested a review from bamsumit June 12, 2024 23:03
Copy link
Contributor

@bamsumit bamsumit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timcheck all looks good. Please convert the example to an unittest as discussed.

timcheck added 4 commits June 26, 2024 18:51
Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
Signed-off-by: Jonathan Timcheck <jonathan.timcheck@intel.com>
@timcheck
Copy link
Contributor Author

timcheck commented Jul 3, 2024

Thanks @bamsumit, I converted the example to a unittest.

Copy link
Contributor

@bamsumit bamsumit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timcheck Looks good to me. Thanks for doing this.

@bamsumit bamsumit marked this pull request as ready for review July 8, 2024 19:04
@bamsumit bamsumit merged commit 3ffe705 into lava-nc:main Jul 8, 2024
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants