当前位置:网站首页>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
边栏推荐
- Visual Studio 2019安装与使用
- Pytorch model pruning example tutorial III. multi parameter and global pruning
- FATFS FAT32学习小记
- onnxruntime-gpu 1.7 出现的警告“Force fallback to CPU execution for node: Gather_191”等
- 1.1 pytorch and neural network
- 【点云系列】Unsupervised Multi-Task Feature Learning on Point Clouds
- GIS实战应用案例100篇(三十四)-拼接2020globeland30
- 【点云系列】SO-Net:Self-Organizing Network for Point Cloud Analysis
- [8] Assertion failed: dims.nbDims == 4 || dims.nbDims == 5
- ArcGIS license server administrator cannot start the workaround
猜你喜欢
随机推荐
x86架构初探之8086
unhandled system error, NCCL version 2.7.8
Chapter 1 numpy Foundation
Visual Studio 2019安装与使用
Solution to slow compilation speed of Xcode
[dynamic programming] Yang Hui triangle
项目文件“ ”已被重命名或已不在解决方案中、未能找到与解决方案关联的源代码管理提供程序——两个工程问题
【点云系列】Unsupervised Multi-Task Feature Learning on Point Clouds
[dynamic programming] different paths 2
Gee configuring local development environment
torch. mm() torch. sparse. mm() torch. bmm() torch. Mul () torch The difference between matmul()
机器视觉系列(02)---TensorFlow2.3 + win10 + GPU安装
Gobang games
GIS实用小技巧(三)-CASS怎么添加图例?
Chapter 4 pytoch data processing toolbox
基于51单片机的温湿度监测+定时报警系统(c51源码)
Proteus 8.10安装问题(亲测稳定不闪退!)
【无标题】制作一个0-99的计数器,P1.7接按键,P2接数码管段,共阳极数码管,P3.0,P3.1接数码管位码,每按一次键,数码管显示加一。请写出单片机的C51代码
torch.where能否传递梯度
Chapter 2 pytoch foundation 2









