目录
1、现象描述:identity not supported yet
2、解决方法:使用onnx optimizer去掉identity层
1、现象描述:identity not supported yet
onnx转换ncnn报错:identity not supported yet
onnx可视化(最后多了个identity层):identity就是f(x)=x。
据大神解释,转onnx就会出现这种迷之op:
2、解决方法:使用onnx optimizer去掉identity层
代码:
from TYY_model import TYY_MobileNet_reg
from keras.utils.vis_utils import plot_model
import onnxmltools
import onnx
from onnx import optimizer
#读取mobilenet keras
weight_file = 'mobilenet_reg_0.25_64_asian.h5'