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

Model shape is not matching with input #8

Open
Tanmayp11 opened this issue Feb 14, 2021 · 4 comments
Open

Model shape is not matching with input #8

Tanmayp11 opened this issue Feb 14, 2021 · 4 comments

Comments

@Tanmayp11
Copy link

Tanmayp11 commented Feb 14, 2021

@DamianCummins Getting error in model.predict()
Error : expected dense_1_input to have shape [null,81] but got array with shape [1,29].

Curl request
curl --location --request POST 'http://localhost:3000/v1/deployments/assistant/message?logPayload=true' \ --header 'Content-Type: application/json' \ --data-raw '{ "fields": [ "text" ], "values": [ [ "hobbies" ] ] }'

@DamianCummins
Copy link
Owner

Hi @Tanmayp11

I've not looked at this project in a while, but having just cloned this repo again from master I was able to start the application and predict against the saved model successfully.

Have you run the notebook to create a new model?

@Tanmayp11
Copy link
Author

@DamianCummins No I haven't run the notebook, was trying with the existing model in the repo. Do I need to do that ?
If yes, can you briefly guide me for that if possible, Thanks in advance !!

@Tanmayp11
Copy link
Author

@DamianCummins is the cURL request I'm using is correct one ?

@Tanmayp11
Copy link
Author

the intents.json file was getting beautified by vscode
Output of words variable from your code
[ "'m", "'s", ',', '.', 'a', 'about', 'account', 'any', 'anyon', 'ar', 'at', 'awesom', 'be', 'blog', 'bsc', 'bye', 'can', 'chat', 'comput', 'could', 'day', 'degr', 'develop', 'did', 'do', 'down-time', 'expery', 'famili', 'for', 'fun', 'github', 'go', 'good', 'goodby', 'hav', 'hello', 'help', 'hi', 'hobby', 'how', 'i', 'ibm', 'in', 'is', 'jav', 'javascrib', 'know', 'langu', 'lat', 'look', 'me', 'next', 'nic', 'of', 'outsid', 'person', 'program', 'project', 'provid', 'python', 'sci', 'see', 'skil', 'som', 'techn', 'tel', 'thank', 'that', 'ther', 'til', 'tim', 'to', 'un', 'univers', 'what', 'wher', 'with', 'work', 'writ', 'yo', 'you' ]

output of words post beautification at my code editor
[ "'s", ',', 'anyon', 'ar', 'awesom', 'bye', 'chat', 'day', 'for', 'good', 'goodby', 'help', 'hey', 'hi', 'how', 'is', 'lat', 'me', 'next', 'nic', 'see', 'thank', 'that', 'ther', 'til', 'tim', 'to', 'univers', 'you', '-1': 'down-time' ]

Trying to learn and understand more deeply

Question: So do we need to build model again, if there is a change in intents.json ? why it did not worked at my editor as expected post beautification

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