diff --git a/aidge_backend_cpu/unit_tests/test_scheduler.py b/aidge_backend_cpu/unit_tests/test_scheduler.py index 0aeeb04b74a078f77c57500b959d6ef9fa9af4d0..2d243e313f5997c094209fdf75be159b820e6037 100644 --- a/aidge_backend_cpu/unit_tests/test_scheduler.py +++ b/aidge_backend_cpu/unit_tests/test_scheduler.py @@ -13,28 +13,25 @@ class test_scheduler(unittest.TestCase): pass def test_relu_forward(self): - values = np.arange(6) - 3 - input_node = aidge_core.Producer(aidge_core.Tensor(values), "Input") + t = aidge_core.Tensor(np.arange(6, dtype=np.int32) - 3) + relu = aidge_core.ReLU() gv = aidge_core.GraphView() gv.add(relu) - gv.add(input_node) - - input_node.add_child(relu) gv.set_datatype(aidge_core.dtype.int32) gv.set_backend("cpu") scheduler = aidge_core.SequentialScheduler(gv) - scheduler.forward() + scheduler.forward(data=[t]) out_tensor = relu.get_operator().get_output(0) expected_out = [0,0,0,0,1,2] for i in range(len(expected_out)): - self.assertEqual(expected_out[i], out_tensor[i]) + self.assertEqual(expected_out[i], out_tensor[i], f"On idx {i}") def test_sequential_scheduling(self): input_data = np.array([0]).astype(np.float32)