|
```
torch 1.7.1+cu101 RTX 2080 Ti
python 3.6
onnx 1.6
rknn-toolkit 1.6.0
```
训练的模型为yolov5s
运行命令:python models/export.py --rknn_mode --add_image_preprocess_layer
出错, 请问我应该怎么处理,如果使用 python models/export.py 是可以正常导出onnx模型的
```
Fusing layers...
Model Summary: 224 layers, 7053910 parameters, 0 gradients
Traceback (most recent call last):
File "models/export.py", line 139, in <module>
y = model(img) # dry run
File "/home/zhangcheng/anaconda3/envs/rknn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "./models/common_rk_plug_in.py", line 122, in forward
x = self.conv1(x)
File "/home/zhangcheng/anaconda3/envs/rknn/lib/python3.6/site-packages/torch/nn/modules/module.py", line 727, in _call_impl
result = self.forward(*input, **kwargs)
File "/home/zhangcheng/anaconda3/envs/rknn/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 423, in forward
return self._conv_forward(input, self.weight)
File "/home/zhangcheng/anaconda3/envs/rknn/lib/python3.6/site-packages/torch/nn/modules/conv.py", line 420, in _conv_forward
self.padding, self.dilation, self.groups)
RuntimeError: Given groups=1, weight of size [3, 3, 1, 1], expected input[1, 640, 3, 640] to have 3 channels, but got 640 channels instead
```
|
|