Browse Source

Merge pull request #1757 from changdazhou/update_requirements

update requirements.txt
cuicheng01 1 year ago
parent
commit
c240a8ec73
2 changed files with 9 additions and 5 deletions
  1. 8 4
      paddlex/ppdet/modeling/ops.py
  2. 1 1
      requirements.txt

+ 8 - 4
paddlex/ppdet/modeling/ops.py

@@ -703,10 +703,14 @@ def multiclass_nms(bboxes,
     helper = LayerHelper('multiclass_nms3', **locals())
 
     if in_dynamic_mode():
-        attrs = ('background_label', background_label, 'score_threshold',
-                 score_threshold, 'nms_top_k', nms_top_k, 'nms_threshold',
-                 nms_threshold, 'keep_top_k', keep_top_k, 'nms_eta', nms_eta,
-                 'normalized', normalized)
+        if paddle.__version__ < '2.4.0':
+            attrs = ('background_label', background_label, 'score_threshold',
+                     score_threshold, 'nms_top_k', nms_top_k, 'nms_threshold',
+                     nms_threshold, 'keep_top_k', keep_top_k, 'nms_eta',
+                     nms_eta, 'normalized', normalized)
+        else:
+            attrs = (score_threshold, nms_top_k, keep_top_k, nms_threshold,
+                     normalized, nms_eta, background_label)
         output, index, nms_rois_num = _C_ops.multiclass_nms3(bboxes, scores,
                                                              rois_num, *attrs)
         if not return_index:

+ 1 - 1
requirements.txt

@@ -6,7 +6,7 @@ pycocotools
 visualdl >= 2.1.1
 paddleslim == 2.2.1
 shapely
-paddlepaddle-gpu >= 2.2.0
+paddlepaddle-gpu >= 2.2.0,<=2.3.2
 opencv-python
 scikit-learn==0.23.2
 lap