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

Build() method with more than one argument #17

Open
yuriy-babenko opened this issue Aug 6, 2024 · 2 comments
Open

Build() method with more than one argument #17

yuriy-babenko opened this issue Aug 6, 2024 · 2 comments

Comments

@yuriy-babenko
Copy link

build = function(input_shape) {

Error message:

Error in py_call_impl(callable, call_args$unnamed, call_args$named) :
ValueError: For a build() method with more than one argument, all arguments should have a _shape suffix and match an argument from call(). E.g. build(self, foo_shape, bar_shape) For layer 'SimpleDense', Received build() argument self, which does not end in _shape.

@t-kalinowski
Copy link
Owner

Thanks for opening. I'm unable to reproduce the error.

How did you install keras / keras3?

I suggest using keras 3 if you can.

install.packages("keras3") # the current CRAN release
reticulate::install_python("3.11")
keras3::install_keras() 

@yuriy-babenko
Copy link
Author

Thanks Tomasz. The suggested solution fixed the issue. I have been following the book and faced this, did not see anything in the errata https://manning-content.s3.amazonaws.com/download/5/66c07d5-197a-4c87-b038-ef28dff7647b/Allaire2_Errata.html but then discovered as well that the current way is using "keras3". Thanks!

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