当我尝试加载一个模型时,当我使用loadModel()
函数tensorflow.js时,我得到了以下错误:
无法加载资源: net::ERR_NAME_NOT_RESOLVED
未捕获(in promise) TypeError:无法获取
下面是predict.js文件
console.log ("hello");
let model;
(async function () {
model = await tf.loadModel("http://keras_model/model.json");
$(".progress-bar").hide();
console.log("it works");
})();
目录结构:
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)
任何帮助都将不胜感激!
https://stackoverflow.com/questions/53031887
复制相似问题