mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-27 20:37:40 -05:00
Wrapped test code in if __name__ == '__main__': guards for: - Module 02 (activations): 7 test calls protected - Module 03 (layers): 7 test calls protected - Module 04 (losses): 10 test calls protected - Module 05 (autograd): 7 test calls protected - Module 06 (optimizers): 8 test calls protected - Module 07 (training): 7 test calls protected - Module 09 (spatial): 5 test calls protected Impact: - All modules can now be imported cleanly without test execution - Tests still run when modules are executed directly - Clean dependency chain throughout the framework - Follows Python best practices for module structure This completes the fix for the entire module system. Modules can now properly import from each other without triggering test code execution.