Skip to content
Snippets Groups Projects
Commit 098edff3 authored by Olivier BICHLER's avatar Olivier BICHLER
Browse files

Fixed unit test

parent 8d3c642e
No related branches found
No related tags found
1 merge request!51Improve export
Pipeline #75733 passed with warnings
......@@ -114,7 +114,8 @@ class test_operator_export(unittest.TestCase):
3- Generate Cpp export with a main that compare the result of the inference with the result obtained at step 2.
4- Retrieve standard output and using regex to now if the results are the same
"""
graph_view.compile("cpu", aidge_core.dtype.float32, dims=in_dims)
graph_view.set_backend("cpu")
graph_view.forward_dims(dims=in_dims)
for node in graph_view.get_nodes():
if node.type() == "Producer":
......@@ -125,7 +126,7 @@ class test_operator_export(unittest.TestCase):
tensor = aidge_core.Tensor(_np_init(value.dims()))
node.get_operator().set_output(0, tensor)
else:
elif default_value != None:
aidge_core.constant_filler(value, default_value)
# Fuse operators to match implemented cpp kernels
......@@ -277,7 +278,6 @@ class test_operator_export(unittest.TestCase):
self.unit_test_export(model, "HardmaxAxis0", [[10]])
@unittest.expectedFailure
def test_FC_image_in(self):
"""Test exporting a FC operator with a HWC input.
"""
......@@ -477,7 +477,7 @@ class test_operator_export(unittest.TestCase):
shape.add_child(model.get_node("reshape"), 0, 1)
model.add(shape)
self.unit_test_export(model, "Reshape", [[1, 7, 8, 2]], random_weights=False)
self.unit_test_export(model, "Reshape", [[1, 7, 8, 2]], random_weights=False, default_value=None)
def test_matmul(self):
print("MatMul")
......
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