export_model.py 导出 ppyoloe_plus 模型总是报错(必现)

作者: frank-flin创建于 2025年9月6日更新于 2026年5月11日

问前搜索

鼠标组件

导出

QQ BugXI 描述臭虫

创建模式 :

类型错误: 在已转换代码中 :

文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/architectures/meta arch.py",第59行,前行
如果自我训练:
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/architectures/meta arch.py", 第69行,前行
输入列表中的输入:
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/architectures/meta arch.py",第76行,前行
offs.append( self. get  pred ())
file "/home/ubuntu/git/Paddle Detectionion/ppdet/modeling/architectures/yolo.py", 第150行,以 get pred
返回自定义。 forward()
文件 "/home/ubuntu/git/Paddle Detectionion/ppdet/modeling/architectures/yolo.py",第92行,以 向上
如果自我训练:
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/architectures/yolo.py",第101行,以 向上
yolo head outs = self.yolo head(颈部)
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/heads/ppyoloe head.py",第277行,前行
如果自我训练:
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/heads/ppyoloe head.py", 第288行,前行
返回自定义。 forward eval(feats)
文件 "/home/ubuntu/git/Paddle Detectionion/ppdet/modeling/heads/ppyoloe head.py",第242行,前行 eval
对于我,在列举(feats)中的功绩:
文件"/home/ubuntu/git/Paddle Detection/ppdet/modeling/heads/ppyoloe head.py",第249行,在ext eval
cls logit = self.pred cls[i](自.stem cls[i](fat,avg feat)) +
文件 "/home/ubuntu/git/Paddle Detection/ppdet/modeling/heads/ppyoloe head.py",第50行,前行
向前( 自身、 成就、 avg  feat) :
重量 = F. sigmoid(自.fc(avg feat))
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 这儿
如果自身. conv :
返回自定义. conv( fat * 重量)

文件"/home/ubuntu/miniconda3/envs/paddledet2/lib/python3.10/ site-packages/paddle/base/degraph/生成 tensor methods patch.py",第46行,以 sigmoid为单位.
返回  C ops.sigmoid(*args,**kwargs)

类型错误:(无效Type) sigmoid (): 参数(位置1)必须是值,但有变量(在/paddle/paddle/fluid/pybind/eager utils.cc:2263)

创建模式*** :

`Python工具/导出 model.py-c 配置/ppyoloe/ppyoloe plus crn s 80e coco.yml-o 权重=https://paddledet.bj.bcebos.com/models/ppyoloe plus crn s 80e coco.pdparams'

环境

划桨-浮点数0.1.7
划桨2onnx 2.0.2rc3
划桨 0.0
划桨-克普 3.3.0.dev2025904
  • 划桨 *划桨-克普:

`pip' 安装 - U - 前划桨 - gpu - i . . . . . . .

内容来源: PaddlePaddle/PaddleDetection