当前位置:网站首页>Gather, unsqueeze and other operators when PTH is converted to onnx
Gather, unsqueeze and other operators when PTH is converted to onnx
2022-04-23 07:27:00 【wujpbb7】
With dynamic input view perhaps reshape Turn into onnx There will be shape/gather/unsqueeze/concat operator .
Replace with flatten that will do .
def forward(self, inputs):
x1 = self.conv1(inputs)
x2 = self.conv2(x1)
# With dynamic input view perhaps reshape Turn into onnx There will be shape/gather/unsqueeze/concat operator .
#x2_flatten = x2.view(x2.size(0), -1)
#x2_flatten = torch.reshape(x2, (x2.size(0), -1))
x2_flatten = torch.flatten(x2, start_dim=1)
x3 = self.fc1(x2_flatten)
x4 = self.fc2(x3)
return x4
版权声明
本文为[wujpbb7]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204230611550629.html
边栏推荐
猜你喜欢
随机推荐
Chapter 2 pytoch foundation 2
基于51单片机的温湿度监测+定时报警系统(c51源码)
Systrace 解析
Unwind 栈回溯详解
enforce fail at inline_container.cc:222
Device Tree 详解
armv8m(cortex m33) MPU实战
The Cora dataset was trained and tested using the official torch GCN
Modifying a column with the 'identity' pattern is not supported
. net encountered failed to decode downloaded font while loading font:
面试总结之特征工程
Chapter 4 pytoch data processing toolbox
传输层重要知识(面试,复试,期末)
SHA512/384 原理及C语言实现(附源码)
Summary of image classification white box anti attack technology
1.2 preliminary pytorch neural network
第1章 NumPy基础
PyTorch 11.正则化
主流 RTOS 评估
AUTOSAR从入门到精通100讲(五十一)-AUTOSAR网络管理