PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.43k stars 2.85k forks source link

paddle.nn.functional has no attribute leaky #8560

Open shuaihutianxie opened 11 months ago

shuaihutianxie commented 11 months ago

问题确认 Search before asking

请提出你的问题 Please ask your question

paddleDection release-2.6版本,paddle-gpu2.3.2-gpu, 服务运行python -m paddle.distributed.launch --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/ppyoloe/ppyoloe_plus_crn_l_80e_coco.yml --eval --amp没有问题,但是使当使用PP-YOLOE-SOD 小目标检测模型(PP-YOLOE Small Object Detection),运行python -m paddle.distributed.launch --log_dir=logs/ --gpus 0,1,2,3,4,5,6,7 tools/train.py -c configs/smalldet/ppyoloe_plus_sod_crn_l_80e_coco.yml --amp --eval 报错如下: Traceback (most recent call last): File "tools/train.py", line 202, in main() File "tools/train.py", line 198, in main run(FLAGS, cfg) File "tools/train.py", line 142, in run trainer = Trainer(cfg, mode='train') File "/home/PaddleDetection/ppdet/engine/trainer.py", line 113, in init self.model = create(cfg.architecture) File "/home/PaddleDetection/ppdet/core/workspace.py", line 255, in create cls_kwargs.update(cls.from_config(config, kwargs)) File "/home/PaddleDetection/ppdet/modeling/architectures/yolo.py", line 68, in from_config neck = create(cfg['neck'], kwargs) File "/home/PaddleDetection/ppdet/core/workspace.py", line 292, in create return cls(**cls_kwargs) File "/home/PaddleDetection/ppdet/modeling/necks/custom_pan.py", line 226, in init (str, dict)) else act File "/home/PaddleDetection/ppdet/modeling/ops.py", line 75, in get_act_fn fn = getattr(F, name) AttributeError: module 'paddle.nn.functional' has no attribute 'leaky' 麻烦看看什么原因导致

nemonameless commented 11 months ago

https://www.paddlepaddle.org.cn/documentation/docs/zh/api/paddle/nn/functional/leaky_relu_cn.html#leaky-relu 可以多搜下官网的文档,以及装最新paddle去使用