Skip to content

Commit 6bf4397

Browse files
authored
Fix input and output test data for roberta-base-11 (#473)
Input data type changed from float64 to int64. Output data files generated using ONNXRUNTIME. Below python code was used import onnx from onnx import numpy_helper import onnxruntime as ort with open("roberta-base-11/test_data_set_0/input_0.pb", "rb") as f: input_tensor = onnx.TensorProto.FromString(f.read()) input = numpy_helper.to_array(input_tensor).astype("int64") sess = ort.InferenceSession("roberta-base-11/roberta-base-11.onnx") output_data = sess.run(["output_1", "output_2"], {"input_ids": input}) output_0 = numpy_helper.from_array(output_data[0]) output_1 = numpy_helper.from_array(output_data[1]) with open("roberta-base-11/test_data_set_0/input_0.pb", "wb") as f: f.write(numpy_helper.from_array(input).SerializeToString()) with open("roberta-base-11/test_data_set_0/output_0.pb", "wb") as f: f.write(output_0.SerializeToString()) with open("roberta-base-11/test_data_set_0/output_1.pb", "wb") as f: f.write(output_1.SerializeToString()) Signed-off-by: Tomasz Jankowski <[email protected]>
1 parent e519d5d commit 6bf4397

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version https://git-lfs.github.com/spec/v1
2-
oid sha256:b14c5c6d6f656192390f7e7b22da2b47755f9f0a5a2b1907205096f7bf14a72d
3-
size 295338327
2+
oid sha256:ddce38695d3d72a8a742b7e03a031040a7b0fd92c270215254ceb4e5a50e766f
3+
size 294964351

0 commit comments

Comments
 (0)