Company logo
  • Jobs
  • Bootcamp
  • About Us
  • For professionals
    • Home
    • Jobs
    • Courses
    • Questions
    • Teachers
    • Bootcamp
  • For business
    • Home
    • Our process
    • Plans
    • Assessments
    • Payroll
    • Blog
    • Calculator

0

103
Views
Unhandled Rejection (Error): The dict provided in model.execute(dict) has keys - multiobject detection with tfjs

I am trying to convert a Keras model and load into React and use it as tensorflow.js

My original Keras model is as follows

model_name:
-- variables
-- keras_metadata.pb
-- saved_model.pb

I then converted it using the following:

tensorflowjs_converter \ --input_format=tf_saved_model \ 
--saved_model_tags=serve \ 
model_name \
web_model

The output was a folder that contains

-- group1-shard1of1.bin
-- model.json

I load the model into react

import * as tf from "@tensorflow/tfjs"
const model = await tf.loadGraphModel('model.json')
const predictions = await model.predict(imageElement);

But I get

The error I get is

Unhandled Rejection (Error): The dict provided in model.execute(dict) has keys:

What does it mean and how can I fix it?

7 months ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post job Plans Our process Sales
Legal
Terms and conditions Privacy policy
© 2023 PeakU Inc. All Rights Reserved.