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.

Issue loading: TypeError: Nt.makeTensor is not a function

See original GitHub issue

I just started and in the latest version I am getting the following error in the browser:

tf-core.esm.js:17 Uncaught (in promise) TypeError: Nt.makeTensor is not a function
    at Sn (tf-core.esm.js:17)
    at kn (tf-core.esm.js:17)
    at o (tf-core.esm.js:17)
    at Fh (tf-core.esm.js:17)
    at tf-core.esm.js:17
    at Array.forEach (<anonymous>)
    at tf-core.esm.js:17
    at Array.forEach (<anonymous>)
    at tf-core.esm.js:17
    at tf-core.esm.js:17

I installed face-api.js with npm install face-api.js. Now using it as follows:

import * as faceapi from 'face-api.js';

await faceapi.nets.tinyFaceDetector.loadFromUri('/models');

As soon as I try to load the model, I get the type error above. Any idea’s where it is going wrong? I saw this https://github.com/tensorflow/tfjs/issues/2194#issuecomment-546187719 but couldn’t see a solution to that. Thanks!

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:3
  • Comments:25 (2 by maintainers)

github_iconTop GitHub Comments

7reactions
ghostcommented, Nov 1, 2019

@justadudewhohacks Thanks for the Tip! I’ve solved my problem 😄

You do not just have to say "@tensorflow/tfjs-core": "1.2.9" in the dependencies-section of the package.json, you also have to prevent tfjs-image-recognition-base from getting a newer version:

"resolutions": {
    "tfjs-image-recognition-base/@tensorflow/tfjs-core": "<=1.2.9"
}
6reactions
Spodeopietercommented, Oct 30, 2019

@luucv this is how I am loading the models :

loadModels = async () => { const MODEL_URL = "/models"; await faceapi.loadSsdMobilenetv1Model(MODEL_URL); await faceapi.loadFaceLandmarkModel(MODEL_URL); await faceapi.loadFaceRecognitionModel(MODEL_URL); };

Read more comments on GitHub >

github_iconTop Results From Across the Web

how to load face-api.js and coco-ssd models in react without ...
js and tensorflow-models/coco-ssd but when i try to load these models i am getting this error Unhandled Rejection (TypeError): t is not a ......
Read more >
Uncaught TypeError | Is Not A Function | Solution - YouTube
Have you encountered an error like:- Uncaught TypeError - Some selector is not a function - jQuery is not a function - owlCarousel...
Read more >
New custom operator extension mechanism (#30690) - OpenI
throw std::runtime_error("function not implemented for this type."); \ ... "Failed to load dynamic operator library, error message(%s).",. errorno));.
Read more >
Merge branch 'develop' of https://github.com/PaddlePaddle/Paddle ...
device load balancer maybe useful here. ... TODO(dzhwinter) : Do not rely on this function, it will be removed ... Always make tensor...
Read more >
JavaScript API for face detection and face recognition in the ...
Issue loading : TypeError: Nt.makeTensor is not a function. I just started and in the latest version I am getting the following error...
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