Skip to content

Commit 4a514b7

Browse files
committed
Fixes dummy input in the signature
1 parent 0deffeb commit 4a514b7

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

onnx_diagnostic/helpers/rt_helper.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,4 +112,12 @@ def make_feeds(
112112

113113
if copy:
114114
flat = [t.copy() if hasattr(t, "copy") else t.clone() for t in flat]
115-
return dict(zip(names, flat))
115+
# bool, int, float, onnxruntime does not support float, bool, int
116+
new_flat = []
117+
for i in flat:
118+
if isinstance(i, (bool, int)):
119+
i = np.array([i], dtype=np.int64)
120+
elif isinstance(i, float):
121+
i = np.array([i], dtype=np.float32)
122+
new_flat.append(i)
123+
return dict(zip(names, new_flat))

0 commit comments

Comments
 (0)