We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I have been trying to run a keras model in browser using keras.js. But whenever i try to predict I got the following error
Error: predict() must take an object where the keys are the named inputs of the model: Here is js code
handlePredict() { const model = new KerasJS.Model({ filepaths: { model: 'model.json', weights: 'model_weights.buf', metadata: 'model_metadata.json' }, gpu : true, filesystem : true }) model.ready().then(() =>{ const inputData = { 'input_1': new Float32Array(samples) } alert('Converted text = ' + inputData['input_1']) return model.predict(inputData['input_1']) }) .then(output => { alert('Predicted value : ' + output['fc1000']); }) .catch(err => { alert(err); }) }
I am using keras-js 0.3.0 and keras 2.2.4 . Any help would be appreciated.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
I have been trying to run a keras model in browser using keras.js. But whenever i try to predict I got the following error
I am using keras-js 0.3.0 and keras 2.2.4 . Any help would be appreciated.
The text was updated successfully, but these errors were encountered: