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

Prediction Error #7

Open
LorisAlif opened this issue Apr 3, 2022 · 1 comment
Open

Prediction Error #7

LorisAlif opened this issue Apr 3, 2022 · 1 comment

Comments

@LorisAlif
Copy link

Hello Gregor, i got this error while i'm trying to predict the result using fis.model.predict(X)

Input to reshape is a tensor with 32 values, but the requested shape has 1
[[{{node myanfis/sumLayer/Reshape}}]] [Op:__inference_predict_function_154498]

May i know why? And what should i do regarding this matter? Thank you!

@gregorLen
Copy link
Owner

Hello @LorisAlif!
Thanks for pointing that out. In a recent push (ffb1120) I improved this.

The tensorflow model needs to know the batch_size of the input. So whenever you use fis.model.predict(X) you need to enter the correct batch_size as argument. Alternatively, you could simply type fis(X) and it does the job automatically.

Unfortunately with this implementation in keras, we are limited to use the same batch_size in training as in the prediction. I am not very happy with this but couldn't find a better alternative.

Hope this helps! Cheers!

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