dddd_trainer
dddd_trainer copied to clipboard
export() got an unexpected keyword argument '_retain_param_name'
Traceback (most recent call last):
File "D:\dddd_trainer-main\app.py", line 33, in
报了这个错误是怎么回事
Training Finished!Exporting Model...
Traceback (most recent call last):
File "app.py", line 33, in
Ubuntu 训练完同样
Training Finished!Exporting Model...
Traceback (most recent call last):
File "E:\dddd_trainer-main\app.py", line 33, in
2022-07-28 11:25:37.843 | INFO | utils.train:start:108 - [2022-07-28-11_25_37] Epoch: 36 Step: 31800 LastLoss: 0.0010917907347902656 AvgLoss: 0.0009280425880569965 Lr: 0.007385691026454037
2022-07-28 11:25:39.978 | INFO | utils.train:start:108 - [2022-07-28-11_25_39] Epoch: 36 Step: 31900 LastLoss: 0.0008689984097145498 AvgLoss: 0.0008995186287211254 Lr: 0.007385691026454037
2022-07-28 11:25:42.212 | INFO | utils.train:start:137 - [2022-07-28-11_25_42] Epoch: 36 Step: 32000 LastLoss: 0.0010542419040575624 AvgLoss: 0.0008768078277353197 Lr: 0.007385691026454037 Acc: 0.90625
2022-07-28 11:25:44.384 | INFO | utils.train:start:108 - [2022-07-28-11_25_44] Epoch: 36 Step: 32100 LastLoss: 0.0006970251561142504 AvgLoss: 0.0008913403417682276 Lr: 0.0072379772059249555
2022-07-28 11:25:46.542 | INFO | utils.train:start:108 - [2022-07-28-11_25_46] Epoch: 36 Step: 32200 LastLoss: 0.0012068169889971614 AvgLoss: 0.0008795152555103414 Lr: 0.0072379772059249555
2022-07-28 11:25:48.683 | INFO | utils.train:start:108 - [2022-07-28-11_25_48] Epoch: 36 Step: 32300 LastLoss: 0.0005893478519283235 AvgLoss: 0.0008610051040886901 Lr: 0.0072379772059249555
2022-07-28 11:25:50.824 | INFO | utils.train:start:108 - [2022-07-28-11_25_50] Epoch: 36 Step: 32400 LastLoss: 0.0008560416754335165 AvgLoss: 0.0008518385927891359 Lr: 0.0072379772059249555
2022-07-28 11:25:52.967 | INFO | utils.train:start:108 - [2022-07-28-11_25_52] Epoch: 36 Step: 32500 LastLoss: 0.0007048668339848518 AvgLoss: 0.0008719124580966309 Lr: 0.0072379772059249555
2022-07-28 11:25:55.062 | INFO | utils.train:start:108 - [2022-07-28-11_25_55] Epoch: 37 Step: 32600 LastLoss: 0.0006410101777873933 AvgLoss: 0.0008731031231582164 Lr: 0.0072379772059249555
2022-07-28 11:25:57.213 | INFO | utils.train:start:108 - [2022-07-28-11_25_57] Epoch: 37 Step: 32700 LastLoss: 0.0009320578537881374 AvgLoss: 0.0008294750811182894 Lr: 0.0072379772059249555
2022-07-28 11:25:59.322 | INFO | utils.train:start:108 - [2022-07-28-11_25_59] Epoch: 37 Step: 32800 LastLoss: 0.0009776148945093155 AvgLoss: 0.000850687074707821 Lr: 0.0072379772059249555
2022-07-28 11:26:01.465 | INFO | utils.train:start:108 - [2022-07-28-11_26_01] Epoch: 37 Step: 32900 LastLoss: 0.0013811136595904827 AvgLoss: 0.0008380734102684073 Lr: 0.0072379772059249555
2022-07-28 11:26:03.674 | INFO | utils.train:start:137 - [2022-07-28-11_26_03] Epoch: 37 Step: 33000 LastLoss: 0.000778629386331886 AvgLoss: 0.000821824642480351 Lr: 0.0072379772059249555 Acc: 0.90625
2022-07-28 11:26:05.869 | INFO | utils.train:start:108 - [2022-07-28-11_26_05] Epoch: 37 Step: 33100 LastLoss: 0.000949505774769932 AvgLoss: 0.0008630690455902368 Lr: 0.0072379772059249555
2022-07-28 11:26:08.024 | INFO | utils.train:start:108 - [2022-07-28-11_26_08] Epoch: 37 Step: 33200 LastLoss: 0.0009300833917222917 AvgLoss: 0.0008534722673357464 Lr: 0.0072379772059249555
2022-07-28 11:26:10.182 | INFO | utils.train:start:108 - [2022-07-28-11_26_10] Epoch: 37 Step: 33300 LastLoss: 0.0007823986816219985 AvgLoss: 0.0008065305658965372 Lr: 0.0072379772059249555
2022-07-28 11:26:12.454 | INFO | utils.train:start:108 - [2022-07-28-11_26_12] Epoch: 37 Step: 33400 LastLoss: 0.0007098791538737714 AvgLoss: 0.0008171254771878011 Lr: 0.0072379772059249555
2022-07-28 11:26:14.961 | INFO | utils.train:start:108 - [2022-07-28-11_26_14] Epoch: 38 Step: 33500 LastLoss: 0.001108370954170823 AvgLoss: 0.0008040564699331299 Lr: 0.0072379772059249555
2022-07-28 11:26:17.309 | INFO | utils.train:start:108 - [2022-07-28-11_26_17] Epoch: 38 Step: 33600 LastLoss: 0.0012630750425159931 AvgLoss: 0.0007878648146288469 Lr: 0.0072379772059249555
2022-07-28 11:26:20.348 | INFO | utils.train:start:108 - [2022-07-28-11_26_20] Epoch: 38 Step: 33700 LastLoss: 0.0008831340819597244 AvgLoss: 0.0007882761370274238 Lr: 0.0072379772059249555
2022-07-28 11:26:24.197 | INFO | utils.train:start:108 - [2022-07-28-11_26_24] Epoch: 38 Step: 33800 LastLoss: 0.0005721147754229605 AvgLoss: 0.0008209841320058331 Lr: 0.0072379772059249555
2022-07-28 11:26:28.109 | INFO | utils.train:start:108 - [2022-07-28-11_26_28] Epoch: 38 Step: 33900 LastLoss: 0.0007059407653287053 AvgLoss: 0.0008052434003911912 Lr: 0.0072379772059249555
2022-07-28 11:26:32.127 | INFO | utils.train:start:137 - [2022-07-28-11_26_32] Epoch: 38 Step: 34000 LastLoss: 0.0009513929835520685 AvgLoss: 0.0008047035793424584 Lr: 0.0072379772059249555 Acc: 1.0
2022-07-28 11:26:32.142 | INFO | utils.train:start:143 -
Training Finished!Exporting Model...
Traceback (most recent call last):
File "app.py", line 33, in
训练完遇到了同样的问题,数据集我用的captcha库生成的4位验证码,大概有2.8w张,前后运行了两次,均提示上述错误,求大佬指导下。。。
我的显卡RTX A2000 12GB,安装的cuba是11.7.57版本,cuddn正常安装,pytorch是1.12.0+cu116版本,python是3.8.10版本
继续补充:把_retain_param_name=false删掉后就不报错了,能够生成模型了,但是会有如下警告: C:\Users\xxx\AppData\Local\Programs\Python\Python38\lib\site-packages\torch\onnx\symbolic_opset9.py:3220: UserWarning: Exporting a model to ONNX with a batch_size other than 1, with a variable length with LSTM can cause an error when running the ONNX model with a different batch size. Make sure to save the model with a batch size of 1, or define the initial states (h0/c0) as inputs of the model. warnings.warn( WARNING: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. WARNING: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function. WARNING: The shape inference of prim::Constant type is missing, so it may result in wrong shape inference for the exported graph. Please consider adding it in symbolic function.
继续补充2:用上述训练成功的模型,结合ddddocr的sdk,能够顺利识别验证码,撒花~
直接删掉 _retain_param_name