-
Notifications
You must be signed in to change notification settings - Fork 69
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
Affine hdf5 export (#221) #222
Conversation
The test will fail, if a network consisting of an Affine layer cannot be exported. This is the case, e.g., if the layer has no shape ('none'). In that case, h5py will interpret it as an ('o') object, which is not supported by the hdf5 format.
The shape of the Affine layer is set with respect to the output of the respective Dense layer. Previously this was 'None', resulting in an error while exporting to hdf5 due to being interpreted as object type by h5py. Now everything works due to being set to Float.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tnaks @ahenkes1 The fix in cuba.py
looks good. I have some concerns about the unittests though. Please address them.
Currently, both tests are failing. This is due to 'l.394' of '/lib/dl/slayer/block/base.py' not being executed. This has to be fixed (?).
@bamsumit I hope everything is fine now. Tests are passing on my machine! |
Hello @bamsumit , @PhilippPlank , is there still something to do here? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @ahenkes1 for this contribution. I've merged it.
Issue Number: #221
Objective of pull request:
A network consisting of an cuba.Affine layer cannot be exported to hd5f due to missing shape information. This is caused by h5py interpreting the missing shapes ('None') as object type ('O'), which is not supported by the hd5f format.
Enable to export the cuba.Affine() layer to hdf5 by inferring the shapes from the respective Dense layer. Additionally, a test was added.
Pull request checklist
Your PR fulfills the following requirements:
flakeheaven lint src/lava tests/
) and (bandit -r src/lava/.
) pass locallypytest
) passes locallyPull request type
Please check your PR type:
What is the current behavior?
Cannot export cuba.Affine layer to hdf5.
What is the new behavior?
cuba.Affine layer can be exported to hdf5.
Does this introduce a breaking change?
Supplemental information