Comments (6)
x = x.view(batchsize, -1, height, width)
-1是自动计算的意思,所以只能有1个,bs是-1了,第二项就不能再是-1了,我改成(batchsize,groups*channels_per_group,height,width)了,数字固定了
from yolov7_plate.
我也遇到了相同的问题,可视化发现concat和reshape算子那边有点问题,onnxruntime测试也是,最后定位在common.py的channel_shuffle这边,需要把batch_size设置为-1,其他对应修改就可以了。
from yolov7_plate.
哥们,很感谢你提供的解决方案,这个common.py是修改完后,需要重新训练一下模型吗?还是在导出为onnx的时候修改?
from yolov7_plate.
我也遇到了相同的问题,可视化发现concat和reshape算子那边有点问题,onnxruntime测试也是,最后定位在common.py的channel_shuffle这边,需要把batch_size设置为-1,其他对应修改就可以了。
哥们,很感谢你提供的解决方案,这个common.py是修改完后,需要重新训练一下模型吗?还是在导出为onnx的时候修改?
from yolov7_plate.
哥们,很感谢你提供的解决方案,这个common.py是修改完后,需要重新训练一下模型吗?还是在导出为onnx的时候修改?
应该不需要重新训练,导出的时候修改就可以。
from yolov7_plate.
def channel_shuffle(x, groups):
batchsize, num_channels, height, width = x.data.size()
channels_per_group = num_channels // groups
batchsize = -1
# reshape
x = x.view(batchsize, groups, channels_per_group, height, width)
x = torch.transpose(x, 1, 2).contiguous()
# flatten
x = x.view(batchsize, -1, height, width)
return x
哥们,你好,我在这个地方做了一下修改,导出的时候报错了,你那边具体是怎么修改的 方便说一下吗?
x = x.view(batchsize, -1, height, width)
RuntimeError: only one dimension can be inferred
from yolov7_plate.
Related Issues (20)
- yolov7导出onnx模型 HOT 7
- 结果绘制问题
- 黑色和蓝色分不清 HOT 1
- 模型onnx导出问题
- ocr limited to 8 characters
- 部署的时候会考虑量化模型么? HOT 1
- yolov7 P6模型训练 HOT 2
- export onnx模型时 选择 exportnms后出现了这个错误 NYI:Named tensors are not supported with the tracer, 可能是在调用models/export.py 的第80行导致的,nn.Squential不支持命名向量,请问目前有什么好的解决办法吗? HOT 1
- 出售中文车牌数据,全部真实环境场景,各个省份都有,特殊车牌也有,价格实惠,欢饮咨询 qq:1039352857 HOT 4
- 想要车牌检测结果显示置信度参数怎么调呢?
- 有e部署的问题
- IndexError: index 13 is out of bounds for axis 0 with size 4 HOT 7
- 一个想法 HOT 1
- 您好,tensorrt c++代码:关键点为2的数据集合训练后导出onnx,c++推理报cuda failure 700错误,请问可能是什么原因? HOT 14
- labelling HOT 4
- training HOT 2
- tensorrt 推理编译错误 CMakeFiles/onnx2trt.dir/onnx2trt.cpp.o: In function `cvflann::anyimpl::big_any_policy<cv::String>::static_delete(void**)': onnx2trt.cpp:(.text._ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv[_ZN7cvflann7anyimpl14big_any_policyIN2cv6StringEE13static_deleteEPPv]+0x15): undefined reference to `cv::String::deallocate()' HOT 2
- No module named 'utils.datasets' HOT 1
- 请问博主有没有可以打label的工具推荐 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yolov7_plate.