Uncaught TypeError: model.predict is not a function
See original GitHub issueHi,
I have imported a pre-trained keras model via json file. Find my javascript below:
var a = (form.input1.value);
$.post('http://127.0.0.1:5000/',{"text":a},function(response)
{
console.log('response: ',response);
var arr=response;
const model=tf.loadModel('./json/model.json');
console.log(model.predict(arr))
});
but I am getting the error that Uncaught TypeError: model.predict is not a function.
Please help this issue.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
How to fix "model.predict is not a function" (tensorflow.js)?
But i got one) And it tells TypeError: model.predict is not a function . Why is it happened? i use this link as...
Read more >Model.predict() not a function - Google Groups
I am trying to do image segementation of cell images to identify cells in tensor flow using data provided in ...
Read more >TypeError: model.predict is not a function Code Example
Answers related to “TypeError: model.predict is not a function”. Uncaught TypeError: $ is not a function · Syntax Error: TypeError: this.getOptions is not...
Read more >Problem with TensorFlow load model - Libraries
Hey, first time I'm using TensorFlow.js and I got a problem: I trained a model and saved it on my computer (2 files:...
Read more >Unable to Predict the custom trained mobilenet in browser ...
async function initialize() { try{ model = await tf. ... Uncaught (in promise) TypeError: Cannot read property 'backend' of undefined at ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
loadModel returns a promise so you have to await it. Try this:
@nsthorat @dsmilkov A big thanks to all of you. Its working fine as I wanted. I am closing this issue.