PaddlePaddle / PaddleX

All-in-One Development Tool based on PaddlePaddle(飞桨低代码开发工具)
Apache License 2.0
4.88k stars 958 forks source link

UnboundLocalError: local variable 'f1score' referenced before assignment #654

Open zz6276750 opened 3 years ago

zz6276750 commented 3 years ago

问题类型:模型训练
问题描述
If regularizer of a Parameter has been set by 'fluid.ParamAttr' or 'fluid.WeightNormParamAttr' already. The Regularization[L2Decay, regularization_coeff=0.000100] in Optimizer will not take effect, and it will only be applied to other Parameters!

中间是训练过程

Traceback (most recent call last): File "multiprocessing\process.py", line 297, in _bootstrap File "multiprocessing\process.py", line 99, in run File "paddlexui\pms\model_tasks\tasks.py", line 68, in _call_paddlex_train File "paddlexui\pms\model_tasks\train\segmentation.py", line 171, in train File "site-packages\paddlex\cv\models\deeplabv3p.py", line 358, in train File "site-packages\paddlex\cv\models\base.py", line 561, in train_loop File "site-packages\paddlex\cv\models\deeplabv3p.py", line 440, in evaluate File "site-packages\paddlex\cv\models\utils\seg_eval.py", line 176, in f1_score UnboundLocalError: local variable 'f1score' referenced before assignment

====================
请在这里描述您在使用过程中的问题,如模型训练出错,建议贴上模型训练代码,以便开发人员分析,并快速响应

FlyingQianMM commented 3 years ago

你好,请问paddlex版本号是多少?可以更新PaddleX到1.3.7

zz6276750 commented 3 years ago

我的版本是1.2.8,我升级一下试试

ljl018 commented 3 years ago

我也遇到了这个问题,我的版本是1.3.8,请问是怎么解决的,我的python版本是3.7.8

ljl018 commented 3 years ago

我电脑上是一张集成显卡和一个独立显卡,这个会不会有影响

Kmito commented 3 years ago

上面的老兄们这个问题解决了没?