Skip to content

Commit

Permalink
update onnxruntime
Browse files Browse the repository at this point in the history
  • Loading branch information
MWieland committed Nov 30, 2022
1 parent 05366bd commit 4f5875e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Changelog
=========

[0.1.6] (2022-11-30)
--------------------
Changed
*******
- update onnxruntime version and add providers to session

[0.1.5] (2022-11-11)
--------------------
Changed
Expand Down
2 changes: 1 addition & 1 deletion ukis_csmask/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.1.5"
__version__ = "0.1.6"
4 changes: 3 additions & 1 deletion ukis_csmask/mask.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ def _csm(self):
x /= [0.16431, 0.16762, 0.18230, 0.17409, 0.16020, 0.14164]

# start onnx inference session and load model
sess = onnxruntime.InferenceSession(str(Path(__file__).parent) + "/model.onnx")
sess = onnxruntime.InferenceSession(
str(Path(__file__).parent) + "/model.onnx", providers=onnxruntime.get_available_providers()
)

# predict on array tiles
y_prob = [sess.run(None, {"input_1": tile[np.newaxis, :]}) for n, tile in enumerate(list(x))]
Expand Down

0 comments on commit 4f5875e

Please sign in to comment.