diff --git a/aidge_backend_cpu/unit_tests/test_recipies.py b/aidge_backend_cpu/unit_tests/test_recipies.py index e343fad1aeda82555a57778a394a4590b1e8772e..89a3210b50dc4b714e32ba4b96bba37b3de7c815 100644 --- a/aidge_backend_cpu/unit_tests/test_recipies.py +++ b/aidge_backend_cpu/unit_tests/test_recipies.py @@ -33,12 +33,9 @@ class test_recipies(unittest.TestCase): conv = aidge_core.Conv2D(1, 1, [3, 3], name="Conv0") bn = aidge_core.BatchNorm2D(1, name="Add0") - graph_view = aidge_core.sequential([conv, bn]) + graph_view = aidge_core.sequential([input_node, conv, bn]) # Add random values to conv and BatchNorm parameters - input_node.add_child(graph_view) - input_node.get_operator().set_datatype(aidge_core.DataType.Float32) - input_node.get_operator().set_backend("cpu") graph_view.set_datatype(aidge_core.DataType.Float32) graph_view.set_backend("cpu") diff --git a/aidge_backend_cpu/unit_tests/test_scheduler.py b/aidge_backend_cpu/unit_tests/test_scheduler.py index 17ff64cf5757d7c37ded4ce23066242cf6bf2fd5..0c41d59963c7633151745f2efe1f1fac3ee07815 100644 --- a/aidge_backend_cpu/unit_tests/test_scheduler.py +++ b/aidge_backend_cpu/unit_tests/test_scheduler.py @@ -40,18 +40,14 @@ class test_scheduler(unittest.TestCase): input_data = np.array([0]).astype(np.float32) input_tensor = aidge_core.Tensor(input_data) - input_node = aidge_core.Producer(input_tensor, "X") - graph_view = aidge_core.sequential([ + aidge_core.Producer(input_tensor, "X"), aidge_core.FC(1, 50, name='0'), aidge_core.FC(50, 50, name='1'), aidge_core.FC(50, 10, name='2'), ]) EXPECTED_SCHEDULE = ['0', '1', '2'] - input_node.add_child(graph_view) - input_node.get_operator().set_datatype(aidge_core.DataType.Float32) - input_node.get_operator().set_backend("cpu") graph_view.set_datatype(aidge_core.DataType.Float32) graph_view.set_backend("cpu") @@ -69,8 +65,8 @@ class test_scheduler(unittest.TestCase): input_data = np.array([0]).astype(np.float32) input_tensor = aidge_core.Tensor(input_data) - input_node = aidge_core.Producer(input_tensor, "X") graph_view = aidge_core.sequential([ + aidge_core.Producer(input_tensor, "X"), aidge_core.FC(1, 50, name='0'), aidge_core.parallel([aidge_core.FC(50, 50, name='1'), aidge_core.FC(50, 50, name='3')]), aidge_core.Add(2, name='2'), @@ -78,9 +74,6 @@ class test_scheduler(unittest.TestCase): EXPECTED_SCHEDULE = [['0', '1', '3', '2'], ['0', '3', '1', '2']] # Both scheduling are valid ! - input_node.add_child(graph_view) - input_node.get_operator().set_datatype(aidge_core.DataType.Float32) - input_node.get_operator().set_backend("cpu") graph_view.set_datatype(aidge_core.DataType.Float32) graph_view.set_backend("cpu")