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

Under Tensorflow 1.14, RBF layer cannot be reloaded after being saved #8

Open
ljcwang opened this issue Sep 13, 2020 · 2 comments
Open

Comments

@ljcwang
Copy link

ljcwang commented Sep 13, 2020

I was trying to reload the model after saving it. I used the same code as the test.py and the command for saving is the same as what you posted. The tensorflow version is 1.14.0 and Keras-application is 1.0.8. Thank you for your help!

The error message is as following:
`rbfnet = load_model("test_rbf.h5", custom_objects={'RBFLayer': RBFLayer})
~\anaconda3\lib\site-packages\tensorflow\python\framework\tensor_util.py in make_tensor_proto(values, dtype, shape, verify_shape, allow_broadcast)
560 raise TypeError("Failed to convert object of type %s to Tensor. "
561 "Contents: %s. Consider casting elements to a "
--> 562 "supported type." % (type(values), values))
563 tensor_proto.string_val.extend(str_values)
564 return tensor_proto

TypeError: Failed to convert object of type <class 'tuple'> to Tensor. Contents: (10, Dimension(1)). Consider casting elements to a supported type.
`

@PetraVidnerova
Copy link
Owner

Thanks. I will look at it and let you know as soon as possible.

@PetraVidnerova
Copy link
Owner

I am not able to repreduce error, getting another one instead. I will have to try anaconda. Sorry for the inconvenience.

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

No branches or pull requests

2 participants