Skip to content

Commit 4431fe5

Browse files
authored
fix: fix probability data type (#391)
This PR fixes the data type for probabilities from int to float.
1 parent e411862 commit 4431fe5

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 0.7.40
2+
3+
* fix: store probabilities with `float` data type instead of `int`
4+
15
## 0.7.39
26

37
* fix: Correctly assign mutable default value to variable in `LayoutElements` class

Diff for: unstructured_inference/__version__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.7.39" # pragma: no cover
1+
__version__ = "0.7.40" # pragma: no cover

Diff for: unstructured_inference/models/yolox.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def image_processing(
137137

138138
return LayoutElements(
139139
element_coords=sorted_dets[:, :4],
140-
element_probs=sorted_dets[:, 4].astype(int),
140+
element_probs=sorted_dets[:, 4].astype(float),
141141
element_class_ids=sorted_dets[:, 5].astype(int),
142142
element_class_id_map=self.layout_classes,
143143
source=Source.YOLOX,

0 commit comments

Comments
 (0)