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
Cannot save keras model with tensorflow lattice layers #47
Comments
Hi! |
I think the problem is that we give same name to the weights for all the instances of a layer. That's why h5 complains that the key is already present while saving the weights |
The names of weights are the same for all layers. |
This is indeed the case. Thank you for pointing this out! I am going to work on a fix now. |
Thanks for reporting the issue. Turns out we should not explicitly call the inner layer .build() during the build for the ParallelCombination layer. The next release will fix this issue. |
Fixed in 2.0.4. |
Saving the model having keras tfl layers creates the following problem.
`/usr/local/lib/python3.6/dist-packages/h5py/_hl/group.py in setitem(self, name, obj)
371
372 if isinstance(obj, HLObject):
--> 373 h5o.link(obj.id, self.id, name, lcpl=lcpl, lapl=self._lapl)
374
375 elif isinstance(obj, SoftLink):
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/_objects.pyx in h5py._objects.with_phil.wrapper()
h5py/h5o.pyx in h5py.h5o.link()
RuntimeError: Unable to create link (name already exists)`
The error is reproduced in the colab example here.
https://colab.research.google.com/drive/1tknejj9CtM27bHGktsZSTnvLvH3eCgG8
The text was updated successfully, but these errors were encountered: