当前位置:网站首页>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
边栏推荐
- [8] Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
- 【点云系列】Unsupervised Multi-Task Feature Learning on Point Clouds
- 机器学习——PCA与LDA
- [point cloud series] pnp-3d: a plug and play for 3D point clouds
- torch.where能否传递梯度
- 【点云系列】PnP-3D: A Plug-and-Play for 3D Point Clouds
- Machine learning II: logistic regression classification based on Iris data set
- torch. mm() torch. sparse. mm() torch. bmm() torch. Mul () torch The difference between matmul()
- Gephi教程【1】安装
- scons 搭建嵌入式arm编译
猜你喜欢
随机推荐
面试总结之特征工程
【无标题】PID控制TT编码器电机
[dynamic programming] Yang Hui triangle
【指标】Precision、Recall
PyTorch 19. PyTorch中相似操作的区别与联系
excel实战应用案例100讲(八)-Excel的报表连接功能
[dynamic programming] longest increasing subsequence
初探智能指针之std::shared_ptr、std::unique_ptr
GIS实战应用案例100篇(五十二)-ArcGIS中用栅格裁剪栅格,如何保持行列数量一致并且对齐?
带您遨游太空,美摄科技为航天创意小程序提供全面技术支持
机器学习——朴素贝叶斯
EasyUI combobox determines whether the input item exists in the drop-down list
imx6ull-qemu 裸机教程2:USDHC SD卡
AUTOSAR从入门到精通100讲(五十一)-AUTOSAR网络管理
PyTorch 9. 优化器
CMSIS CM3源码注解
【点云系列】Neural Opacity Point Cloud(NOPC)
Pytoch model saving and loading (example)
. net encountered failed to decode downloaded font while loading font:
AUTOSAR从入门到精通100讲(八十三)-BootLoader自我刷新