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

NETX library fails to convert simple slayer classification network to an equivalent lava network #92

Open
4 of 12 tasks
rhendz opened this issue Aug 17, 2022 · 2 comments
Assignees
Labels
0-needs-more-info Issue needs more information/code snippet

Comments

@rhendz
Copy link

rhendz commented Aug 17, 2022

Objective of issue: I trained an IRIS network using the slayer library to near 100% accuracy and converted it over to a lava process using the netx library; however, the accuracy is not the same (about 33%). I need documentation or examples on how to convert a network trained via slayer over to a lava process with minimal accuracy loss if possible.

Lava DL version:

  • 0.3.0 (feature release)
  • 0.2.1 (bug fixes)
  • 0.2.0 (current version)
  • 0.1.2

Lava version:

  • 0.4.0 (feature release)
  • 0.3.1 (bug fixes)
  • 0.3.0 (current version)
  • 0.2.0
  • 0.1.2

I'm submitting a ...

  • bug report
  • feature request
  • documentation request

Current behavior:

  • Slayer trained network is not converting over (netx) to an equivalent network in lava.

Expected behavior:

  • Each network (slayer and lava) should produce the same inference results.

Steps to reproduce:

# Clone and setup my custom repo
git clone https://github.com/rhendz/lava-apps.git
cd lava-apps
sh setup.sh

# Use lava-dl virtual environment
source lava-dl/.venv/bin/activate

# Setup notebook and kernel
pip install notebook
pip install ipykernel

python -m ipykernel install --user --name=lavadl

# Launch notebook
jupyter notebook

# Notes:
# Use lava-dl-netx-iris to test inference of original network and generate/run an inference test on the netx network
# Use lava-dl-slayer-iris to train IRIS network
# Change kernel to lavadl

Other information:
My objective is to eventually bring in other networks via netx library and be able to produce good inference results in lava. However, I need a good baseline via the slayer library first.

@rhendz rhendz changed the title NETX library fails to convert simple slayer classification network to a lava process NETX library fails to convert simple slayer classification network to an equivalent lava network Aug 17, 2022
@nskat
Copy link

nskat commented Jan 11, 2023

Hi @rhendz, did you manage to find a solution to this? I've found the same issue when loading networks using netx with the latest lava/lava-dl versions.
Interestingly, if I write the net's Process and ProcessModel by hand, it works perfectly fine -- this may help the dev team figure this out.

@timcheck timcheck added 0-needs-more-info Issue needs more information/code snippet and removed 0-needs-work labels Jan 23, 2023
@Geoforger
Copy link

Hi, was this issue ever resolved? I'm having similar issues using lava 0.7.0 and lava-dl 0.3.3. My lava-dl trained classifier is achieving very high accuracies in training but after conversion with netx is seemingly making random decisions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0-needs-more-info Issue needs more information/code snippet
Projects
None yet
Development

No branches or pull requests

6 participants