Files
TinyTorch/modules/source
Vijay Janapa Reddi 28dd04cab3 fix: resolve 05_cnn external test failures completely
🎯 Issues Fixed:
1. Conv2D Layer: Made polymorphic to preserve input tensor types (MockTensor compatibility)
2. Flatten Function: Made polymorphic to return same type as input tensor
3. Type Signatures: Updated method signatures to be flexible (remove Tensor type annotations)

 Impact: 05_cnn external tests now pass 35/35 (was 31/35)

🔧 Technical Changes:
- Conv2D.forward(): return type(x)(result) instead of Tensor(result)
- flatten(): return type(x)(result) instead of Tensor(result)
- Updated method signatures: forward(self, x) instead of forward(self, x: Tensor) -> Tensor
- Consistent polymorphic pattern across all CNN components

This resolves the MockTensor vs Tensor compatibility issues, making CNN components work with external testing frameworks.
2025-07-13 22:16:21 -04:00
..