Explorar o código

Merge pull request #1147 from will-jl944/optimize_jf

Cast anchors to list in anchor clustering
will-jl944 %!s(int64=4) %!d(string=hai) anos
pai
achega
7c7d4d6d94
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      paddlex/tools/anchor_clustering/yolo_cluster.py

+ 2 - 1
paddlex/tools/anchor_clustering/yolo_cluster.py

@@ -173,5 +173,6 @@ class YOLOAnchorCluster(BaseAnchorCluster):
                 f, centers = new_f, new_centers.copy()
                 pbar.desc = 'Evolving anchors with Genetic Algorithm: fitness = %.4f' % f
 
-        centers = np.round(centers[np.argsort(centers.prod(1))]).astype(int)
+        centers = np.round(centers[np.argsort(centers.prod(1))]).astype(
+            int).tolist()
         return centers