Skip to content
New issue

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

tf.loadModel is not a function #2

Closed
hyufeng opened this issue Sep 24, 2019 · 5 comments
Closed

tf.loadModel is not a function #2

hyufeng opened this issue Sep 24, 2019 · 5 comments

Comments

@hyufeng
Copy link

hyufeng commented Sep 24, 2019

os: win10
chrome: 77.0.3865.90(正式版本) (64 位)
node: v12.9.0

导入代码:
`
require('babel-polyfill');
const Runtime = require('../../engine/runtime');

const Clone = require('../../util/clone');
const Cast = require('../../util/cast');
const Video = require('../../io/video');
const formatMessage = require('format-message');

const tf = require('@tensorflow/tfjs');
const mobilenetModule = require('./mobilenet');
const knnClassifier = require('@tensorflow-models/knn-classifier');
`

mobilenet.js:1130 Uncaught (in promise) TypeError: tf.loadModel is not a function
at MobileNet. (mobilenet.js:1130)
at step (mobilenet.js:54)
at Object.next (mobilenet.js:35)
at mobilenet.js:28
at new Promise ()
at __awaiter (mobilenet.js:24)
at MobileNet.load (mobilenet.js:1123)
at Object. (mobilenet.js:1105)
at step (mobilenet.js:54)
at Object.next (mobilenet.js:35)

重现错误:
安装依赖后,复制代码,点击插件图标后,在console中报此错。

@wwj718
Copy link
Contributor

wwj718 commented Sep 29, 2019

@summerscar

@summerscar
Copy link
Member

@hyufeng
Copy link
Author

hyufeng commented Oct 10, 2019

问题已经解决啦,是@tensorflow/tfjs这个库的版本更新啦,恢复到原来的0.10.0版本就解决啦

@STEMbotixd
Copy link

Uncaught (in promise) TypeError: tf.loadLayersModel is not a function
at MobileNet. (mobilenet.js:1132:1)
at step (mobilenet.js:55:1)
at Object.next (mobilenet.js:36:1)
at mobilenet.js:29:1
at new Promise ()
at __awaiter (mobilenet.js:25:1)
at ./node_modules/blockzie-vm/src/extensions/scratch3_knn/mobilenet.js.MobileNet.load (mobilenet.js:1124:1)
at Object. (mobilenet.js:1106:1)
at step (mobilenet.js:55:1)
at Object.next (mobilenet.js:36:1)
sir please solve this error

@STEMbotixd
Copy link

update my @tensorflow/tfjs update package but error is same.
Uncaught (in promise) TypeError: tf.loadLayersModel is not a function
at MobileNet. (mobilenet.js:1132:1)
at step (mobilenet.js:55:1)
at Object.next (mobilenet.js:36:1)
at mobilenet.js:29:1
at new Promise ()
at __awaiter (mobilenet.js:25:1)
at ./node_modules/blockzie-vm/src/extensions/scratch3_knn/mobilenet.js.MobileNet.load (mobilenet.js:1124:1)
at Object. (mobilenet.js:1106:1)
at step (mobilenet.js:55:1)
at Object.next (mobilenet.js:36:1)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants