Browse Source

reduced the precision of the probability arrays

Dimitri Korsch 2 năm trước cách đây
mục cha
commit
e05126125a
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 2 2
      cvdatasets/annotation/mixins/hierarchy_mixin.py

+ 2 - 2
cvdatasets/annotation/mixins/hierarchy_mixin.py

@@ -127,7 +127,7 @@ class Hierarchy:
 
 
 	def _uncond_probs(self, cond_probs):
-		uncond_probs = np.zeros_like(cond_probs, dtype=np.float64)
+		uncond_probs = np.zeros_like(cond_probs, dtype=np.float16)
 		_dim = self.orig_lab_to_dimension.get
 
 		for lab in self.topo_sorted_orig_labels:
@@ -148,7 +148,7 @@ class Hierarchy:
 		return uncond_probs
 
 	def _joint_probs(self, uncond_probs):
-		joint_probs = np.zeros_like(uncond_probs, dtype=np.float64)
+		joint_probs = np.zeros_like(uncond_probs, dtype=np.float16)
 		_dim = self.orig_lab_to_dimension.get
 
 		for lab in reversed(self.topo_sorted_orig_labels):