Browse Source

fix bug of normalize

jiangjiajun 5 năm trước cách đây
mục cha
commit
db6c82530c
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      paddlex/cv/transforms/ops.py

+ 1 - 1
paddlex/cv/transforms/ops.py

@@ -26,7 +26,7 @@ def normalize(im, mean, std, min_value=[0, 0, 0], max_value=[255, 255, 255]):
     # Standardization (Z-score Normalization)
     im -= mean
     im /= std
-    return im
+    return im.astype('float32')
 
 
 def permute(im, to_bgr=False):