LiteModuleLoader.load(assetFilePath(this, “testandroid2.ptl”));加载模型报错PytorchStreamReader failed locating file bytecode.pkl: file not found ()
文档网址
https://pytorch.org/tutorials/recipes/mobile_interpreter.html
pytorch默认解释器生成模型的不匹配android这边。所以需要换个移动端解释器,加载原模型,重新保存移动端模型文件
scripted_module = torch.jit.script(model)
scripted_module._save_for_lite_interpreter(“testandroid2.ptl”)
报错解决,但是存在识别错误问题