当前位置:网站首页>Replacement operation not supported by ncnn partial operators
Replacement operation not supported by ncnn partial operators
2022-07-19 03:12:00 【HySmiley】
Some operator correspondence references :https://blog.csdn.net/lhyyhlfornew/article/details/109821707
onnx-sim conversion ncnn Model time , Some operators are not supported
Report errors :Tile 、Gather、view、repeat not supported yet!
1、Gather I won't support it
Gather Mainly forward There is... In the code Tensor indexing operation
resolvent : take forward The parameter tensor is segmented in advance as a parameter , Input becomes multiple ,
At the last output, the tensor of each segmentation is calculated separately .
Such as :forward(self,data) data_shape:3,3,64,64
x=data[0]+data[1]+data[2] #(3,64,64)
return x
It is amended as follows forward(self,data1,data2,data3) #1,3,64,64
x=data1+data2+data3 #1,3,64,64
x=x.squeeze(0)#(3,64,64)
return x
2、repeat I won't support it
When repeating operations on a channel , switch views .
Such as :forward(self,data) data_shape:(1,3,64,64)
x=data.repeat(3,1,1,1)#(3,3,64,64)
return x
It can be used torch.cat Replace :
forward(self,data) data_shape:(1,3,64,64)
ls=[]
for i in range(3):# The number of times to repeat
ls.append(data)
x=torch.cat(ls,dim=0)#(3,3,64,64)
return x
3、view、reshap onnx No, but simplify After that you can
To be continued ..
边栏推荐
猜你喜欢
随机推荐
MySQL面试题(2022)
SQL经典练习题(x30)
要开源节流
【单片机仿真】(六)寻址方式 — 变址寻址与相对寻址
半年时间的思考
mysql复制表
多项式插值拟合(三)
【单片机仿真】(十六)控制转移类指令 — 无条件转移指令、条件转移指令
【单片机仿真】(十五)指令系统位操作类指令 — 位运算指令、位条件转移指令
[MCU simulation] (XXI) dB (define byte) - define byte
JPA初识(ORM思想、JPA的基本操作)
无线用的鉴权代码
【单片机仿真】(九)指令系统 — 算术运算指令 之 ADD、ADDC、SUBB、INC、DEC、DA
05 central processing unit
[MCU simulation] (XIV) instruction system bit operation instructions - bit data transmission instructions MOV, bit variable modification instructions
Specifications、多表查询基础
多项式插值拟合(二)
自动装配 & 集合注入
ncnn 部分算子不支持的替换操作
JDBC connection to MySQL database








