需要帮助解决在浏览器中加载保存的张量流模型时出现的错误

时间:2019-07-10 18:44:10

标签: tensorflow.js

loadLayersModel调用触发此处描述的异常。 我正在尝试将保存的模型加载到浏览器中。

TensorFlow.js版本 1.2.2

浏览器版本 镀铬 版本75.0.3770.100

async function loadModel(sym) {
   saved_model = await tf.loadLayersModel('localstorage://'+sym+'')
}

Error Description
-----------------
recurrent.ts:2236
Uncaught (in promise) TypeError: Cannot read property 'length' of 
undefined
 at e.fromConfig (recurrent.ts:2236)
 at _p (generic_utils.ts:277)
 at od (serialization.ts:31)
 at e.fromConfig (recurrent.ts:2237)
 at _p (generic_utils.ts:277)
 at od (serialization.ts:31)
 at e.fromConfig (recurrent.ts:836)
 at _p (generic_utils.ts:277)
 at od (serialization.ts:31)
 at e.fromConfig (models.ts:1000)

0 个答案:

没有答案