首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >无法在tensorflow.js中加载python训练的模型

无法在tensorflow.js中加载python训练的模型
EN

Stack Overflow用户
提问于 2018-10-28 21:12:22
回答 2查看 883关注 0票数 1

当我尝试加载一个模型时,当我使用loadModel()函数tensorflow.js时,我得到了以下错误:

无法加载资源: net::ERR_NAME_NOT_RESOLVED

未捕获(in promise) TypeError:无法获取

下面是predict.js文件

代码语言:javascript
复制
console.log ("hello");

let model;
(async function () {
    model = await tf.loadModel("http://keras_model/model.json");
    $(".progress-bar").hide();
    console.log("it works");
})();

目录结构:

代码语言:javascript
复制
main
  -dataset  (contains images for training the model) 
  -training_scripts (python scripts to train the model)
  -user_interface
     --server.js (server made using node.js(and express))
     --static (this folder contains the trained keras model)
         --index.html (html file to be served)
         --predict.js 
         --keras_model(this folder contains the model.json file)

任何帮助都将不胜感激!

EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/53031887

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档