question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

speech-command Unable to load the model using ensureModelLoaded

See original GitHub issue

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): No
  • OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows10
  • TensorFlow.js installed from (npm or script link): npm
  • TensorFlow.js version (use command below): 3.0.0
  • Browser version: Version 88.0.4324.150 (Official Build) (x86_64)

Describe the current behavior Error when trying to load the model using ensureModelLoaded method: Uncaught (in promise) Error: No backend found in registry.

Describe the expected behavior Expected to load the model.

Standalone code to reproduce the issue Example in Codesandbox

Other info / logs It was working fine in speech-command 0.4.2, but faced this issue after using the latest version 0.5.1

Full error:

Uncaught (in promise) Error: No backend found in registry.
    at ut.getSortedBackends (speech-commands.esm.js:17)
    at ut.initializeBackendsAndReturnBest (speech-commands.esm.js:17)
    at ut.get backend [as backend] (speech-commands.esm.js:17)
    at ut.makeTensor (speech-commands.esm.js:17)
    at Ss (speech-commands.esm.js:17)
    at Po.apply (speech-commands.esm.js:17)
    at Sh.addWeight (speech-commands.esm.js:17)
    at Sh.build (speech-commands.esm.js:17)
    at speech-commands.esm.js:17
    at ho (speech-commands.esm.js:17)
    at Sh.apply (speech-commands.esm.js:17)
    at $u.add (speech-commands.esm.js:17)
    at fromConfig (speech-commands.esm.js:17)
    at _a (speech-commands.esm.js:17)
    at Ml (speech-commands.esm.js:17)
    at speech-commands.esm.js:17

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
rthadurcommented, Feb 16, 2021

Here is the link which explains why we need add https://github.com/tensorflow/tfjs/releases/tag/tfjs-v2.0.0

thank you

1reaction
pyu10055commented, Feb 13, 2021

Look like it might have been treeshaked, here what I did:

import React from "react";
import * as tf from "@tensorflow/tfjs";
import * as speechCommands from "@tensorflow-models/speech-commands";
import { useState } from "react";

console.log(tf.engine().backend);
Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot load @tensorflow-models/speech-commands
I am trying to load tensorflow.js model speech-commands in my react-native-app. But after trying a lot I am not able to load the...
Read more >
Transfer learning with Tensorflow.js
Now we need to build a model with the correct architecture (like Speech Command) and feed our sample data to it for training....
Read more >
Speech Recognition with TensorFlow.js - Live Code Stream
loadModel() is responsible for creating the recognizer instance and load the model. When the model is loaded we will be able to get...
Read more >
Build Speech Recognition in JavaScript | by Sathishravi
It doesn't mean that you should not use TensorFlow.js, ... API that will evaluate the model to see which word we were able...
Read more >
Controlling a web page with voice commands using ... - LinkedIn
Next, we are making sure the model was loaded (if you are not sure ... to create a new speechCommands instance with the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found