diff --git a/modules/source/09_autograd/autograd_dev.py b/modules/source/09_autograd/autograd_dev.py index da5a0f0f..68269dff 100644 --- a/modules/source/09_autograd/autograd_dev.py +++ b/modules/source/09_autograd/autograd_dev.py @@ -350,9 +350,12 @@ def test_unit_variable_class(): print(f"✅ Data access and properties working") print(f"✅ Gradient management working") +# Run the test +test_unit_variable_class() + # Run inline tests when module is executed directly if __name__ == "__main__": - test_variable_class() + test_unit_variable_class() # %% [markdown] """ @@ -493,6 +496,9 @@ def test_unit_add_operation(): print(f"✅ Backward pass computing correct gradients") print(f"✅ Scalar addition working correctly") +# Run the test +test_unit_add_operation() + # Run inline tests when module is executed directly if __name__ == "__main__": test_add_operation() @@ -627,9 +633,12 @@ def test_unit_multiply_operation(): print(f"✅ Backward pass implementing product rule correctly") print(f"✅ Scalar multiplication working correctly") +# Run the test +test_unit_multiply_operation() + # Run inline tests when module is executed directly if __name__ == "__main__": - test_multiply_operation() + test_unit_multiply_operation() # %% nbgrader={"grade": false, "grade_id": "subtract-operation", "locked": false, "schema_version": 3, "solution": true, "task": false} #| export @@ -725,9 +734,12 @@ def test_unit_subtract_operation(): print(f"✅ Backward pass implementing subtraction rule correctly") print(f"✅ Scalar subtraction working correctly") +# Run the test +test_unit_subtract_operation() + # Run inline tests when module is executed directly if __name__ == "__main__": - test_subtract_operation() + test_unit_subtract_operation() # %% [markdown] """ @@ -810,9 +822,12 @@ def test_unit_chain_rule(): print(f"✅ Automatic gradient computation working correctly") print(f"✅ Chain rule implemented correctly") +# Run the test +test_unit_chain_rule() + # Run inline tests when module is executed directly if __name__ == "__main__": - test_chain_rule() + test_unit_chain_rule() # %% [markdown] """ @@ -926,6 +941,9 @@ def test_module_neural_network_training(): print(f"✅ Autograd enables automatic training") print(f"✅ Ready for complex neural network architectures!") +# Run the test +test_module_neural_network_training() + # %% [markdown] """ ## 🧪 Module Testing