mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-04-28 19:44:47 -05:00
Removed redundant test calls from all modules: - Eliminated verbose if __name__ == '__main__': blocks - Removed duplicate individual test calls - Each module now simply calls test_module() directly Changes made to all 9 modules: - Module 01 (Tensor): Simplified from 16-line main block to 1 line - Module 02 (Activations): Simplified from 13-line main block to 1 line - Module 03 (Layers): Simplified from 17-line main block to 1 line - Module 04 (Losses): Simplified from 20-line main block to 1 line - Module 05 (Autograd): Simplified from 19-line main block to 1 line - Module 06 (Optimizers): Simplified from 17-line main block to 1 line - Module 07 (Training): Simplified from 16-line main block to 1 line - Module 08 (DataLoader): Simplified from 17-line main block to 1 line - Module 09 (Spatial): Simplified from 14-line main block to 1 line Impact: - Notebook-friendly: Tests run immediately in Jupyter environments - No redundancy: test_module() already runs all unit tests - Cleaner code: ~140 lines of redundant code removed - Better for students: Simpler, more direct execution flow