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:
Vijay Janapa Reddi
2025-09-28 19:46:45 -04:00
parent c7679e510d
commit a66a7de207

Diff Content Not Available