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

Error loading '.net' model with netx.hdf5 #149

Closed
3 of 14 tasks
ZoltanV-V opened this issue Jan 5, 2023 · 4 comments · Fixed by #156
Closed
3 of 14 tasks

Error loading '.net' model with netx.hdf5 #149

ZoltanV-V opened this issue Jan 5, 2023 · 4 comments · Fixed by #156
Assignees

Comments

@ZoltanV-V
Copy link

Hello, I recently updated to the latest version of lava-dl and lava and I am coming across this error when trying to load my '.net' model with netx:

File "lava-dl/tutorials/lava/lib/dl/bootstrap/mnist/mnist.py", line 386, in
net = hdf5.Network(net_config=trained_folder + '/network.net')
File "./lava-dl-env/lib/python3.8/site-packages/lava/magma/core/process/process.py", line 33, in call
obj = type.call(cls, *args, **kwargs)
File "./lava-dl-env/lib/python3.8/site-packages/lava/lib/dl/netx/hdf5.py", line 76, in init
self.layers = self._create()
File "./lava-dl-env/lib/python3.8/site-packages/lava/lib/dl/netx/hdf5.py", line 444, in _create
layer, table = self.create_input(
File "./lava-dl-env/lib/python3.8/site-packages/lava/lib/dl/netx/hdf5.py", line 263, in create_input
height=shape[1],
IndexError: tuple index out of range

I am just running the mnist tutorial for bootstrap so exporting the model with this line:
net.export_hdf5(trained_folder + '/network.net')

And following the netx tutorial, I'm loading it with this line:
net = hdf5.Network(net_config=trained_folder + '/network.net')

My h5py version is 3.7.0

Any suggestion on how to resolve the issue would be appreciated. Thank you!

Objective of issue:

Lava DL version:

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

Lava version:

  • 0.5
  • 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:

Expected behavior:

Steps to reproduce:

Related code:

insert short code snippets here

Other information:

insert the output from lava debug here
@bamsumit bamsumit self-assigned this Jan 6, 2023
@bamsumit
Copy link
Contributor

bamsumit commented Jan 6, 2023

@ZoltanV-V thanks for reporting it. We will look into the issue.

@bamsumit bamsumit linked a pull request Jan 13, 2023 that will close this issue
16 tasks
@bamsumit
Copy link
Contributor

@ZoltanV-V We have fixed the issue. Can you try the latest code and see if it works for you?

Since you are already looking at the MNIST inference, it would be great if you can contribute an inference notebook for it.

@ZoltanV-V
Copy link
Author

@bamsumit I've just tried it with the update and it works now, thank you! I would be happy to contribute an inference notebook. Thanks again!

@bamsumit
Copy link
Contributor

Great! Thanks for the update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants