同问这个问题。 从tensorflow.js的movenet转换到onnx的模型,加载时提示错误。 {"errMsg":"createInferenceSession:fail create session fail : xnet error:6: Failed to convert ONNX model to XNet modelFailed to convet onnx to xnet\n","errno":2004001} 初始化代码如下: _loadModel(modelPath) { if (!modelPath) { console.error('model path is null!') } let modelFile = modelPath console.log('...wxwxwx...modelFile', modelFile) return new Promise((resolve, reject) => { this.wxInferenceSession = wx.createInferenceSession({ model: modelFile , // precisionLevel: 4, // allowNPU: true, // allowQuantize: false, typicalShape: {input:[1,256,256,3]} }) // 监听error事件 this.wxInferenceSession.onError((error) => { console.error(error) reject(error) }) this.wxInferenceSession.onLoad(() => { this.ready = true resolve() }) }) }
createInferenceSession failed 转换ONNX模型失败?createInferenceSession:fail create session fail : xnet error:6: Failed to convert ONNX model to XNet modelFailed to convet onnx to xnet 背景: 测试用的模型来自于torchvision ssdlite通过torch.onnx.export导出该模型在onnxruntime上可以成功运行如何获得模型转换失败的更详细原因? 什么是XNet模型?
2023-03-21