mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-06-01 09:12:51 -05:00
Fix XOR example: Clean data access and proper parameter names
Fixed xor_1969 example to work with current TinyTorch: - Fixed tensor data access patterns for loss computation - Changed weight->weights to match Linear layer API - Fixed test function comparison operations - Removed hasattr hacks with proper numpy conversion Current status: - Example runs without errors - Network initialization and forward pass working - Training loop executes properly - Note: Network not learning XOR (gradient flow issue in framework) The example code is clean and educational, demonstrating proper multi-layer network architecture for solving XOR problem.
This commit is contained in: