Skip to content
Snippets Groups Projects
Commit 443229f5 authored by Yaman Umuroglu's avatar Yaman Umuroglu
Browse files

[Tests] refactor for new base data pkg name

parent 72bc7b37
No related branches found
No related tags found
No related merge requests found
......@@ -139,7 +139,7 @@ def get_example_input(topology):
"Get example numpy input tensor for given topology."
if "fc" in topology:
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
onnx_tensor = onnx.load_tensor_from_string(raw_i)
return nph.to_array(onnx_tensor)
elif topology == "cnv":
......
......@@ -55,7 +55,7 @@ def test_brevitas_debug():
assert len(model.graph.input) == 1
assert len(model.graph.output) == 1
# load one of the test vectors
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
# run using FINN-based execution
input_dict = {"0": nph.to_array(input_tensor)}
......
......@@ -68,7 +68,7 @@ def test_brevitas_fc_onnx_export_and_exec(size, wbits, abits):
assert len(model.graph.input) == 1
assert len(model.graph.output) == 1
# load one of the test vectors
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
# run using FINN-based execution
input_dict = {"0": nph.to_array(input_tensor)}
......
......@@ -110,7 +110,7 @@ def test_convert_to_hls_layers_tfc_w1a1():
model = model.transform(CompileCppSim())
model = model.transform(SetExecMode("cppsim"))
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
# run using FINN-based execution
input_dict = {"global_in": nph.to_array(input_tensor)}
......@@ -175,7 +175,7 @@ def test_convert_to_hls_layers_tfc_w1a2():
model = model.transform(PrepareCppSim())
model = model.transform(CompileCppSim())
model = model.transform(SetExecMode("cppsim"))
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
# run using FINN-based execution
input_dict = {"global_in": nph.to_array(input_tensor)}
......
......@@ -52,7 +52,7 @@ def test_sign_to_thres():
new_model = model.transform(ConvertSignToThres())
assert new_model.graph.node[3].op_type == "MultiThreshold"
# load one of the test vectors
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
input_dict = {"0": nph.to_array(input_tensor)}
assert oxe.compare_execution(model, new_model, input_dict)
......
......@@ -72,7 +72,7 @@ def test_streamline_fc(size, wbits, abits):
model = model.transform(GiveReadableTensorNames())
model = model.transform(RemoveStaticGraphInputs())
# load one of the test vectors
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
# run using FINN-based execution
input_dict = {"global_in": nph.to_array(input_tensor)}
......
......@@ -77,7 +77,7 @@ def test_batchnorm_to_affine_lfc_w1a1():
model = model.transform(FoldConstants())
new_model = model.transform(BatchNormToAffine())
# load one of the test vectors
raw_i = get_data("finn.base-data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
raw_i = get_data("finn.data", "onnx/mnist-conv/test_data_set_0/input_0.pb")
input_tensor = onnx.load_tensor_from_string(raw_i)
input_dict = {"0": nph.to_array(input_tensor)}
assert oxe.compare_execution(model, new_model, input_dict)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment