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
ValueError occurred when building cascaded model with loaded sub-model #19374
Comments
Hi @keisen , I did some debugging and find out the reason for this error.Basically the output of child model is Keras Tensor whereas It's quite interesting why the Sharing the gist with the debug info so far. |
Yep, That's why I asked you to resolve this issue. X = tf.random.normal((1, 8, 8, 3))
print('child_model :', child_model(X))
print('loaded_child_model:', loaded_child_model(X)) Then I got the output below:
As you can see above, The result of Before posting, I was going to debug and hack to work around this issue, I'm looking forward to hearing good news from you! |
Hi @keisen , I also have tested with numpy array and predictions are same for both . It seems this is happening with Keras Tensor(placeholder) only. You can notice the same on gist. I am also looking into it for the root cause.Its taking time apparently. |
Yep, I know.
It's okay, no worries. Rather, I really appreciate you to take on this tough work. Sincerely, |
It appears I have fixed this issue as the same issue was previously reported in a different ticket. Please check that Keras at HEAD works for you. |
Hi, keras team!
I'm facing a error when build cascaded model with sub-model loaded from a file.
It's okay if the sub-model is NOT loaded from file, just created on memory.
This behavior appeared form keras 3+. Until keras 2.x, it didn't exist definitely.
I wrote the code to reproduce error, please refer to notebook below:
https://gist.github.com/keisen/4703d6508a950ff6a35d84da73e335b8
Please improve this issue or let me know how to work around with keras 3.x....
Thanks!
The text was updated successfully, but these errors were encountered: