mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-03-11 21:14:17 -05:00
Add numbered prefixes to complete modules
- Rename complete modules to numbered progression: - setup → 00_setup - tensor → 01_tensor - activations → 02_activations - layers → 03_layers - networks → 04_networks - dataloader → 05_dataloader - Update test imports to use new numbered module names - Keep incomplete modules (autograd, training, etc.) unnumbered - Clear progression: 6 complete modules ready for students - Maintains rock solid foundation approach with proper imports
This commit is contained in:
@@ -36,7 +36,7 @@ This module builds on the **activations** module:
|
||||
"""
|
||||
## 📦 Where This Code Lives in the Final Package
|
||||
|
||||
**Learning Side:** You work in `modules/layers/layers_dev.py`
|
||||
**Learning Side:** You work in `modules/03_layers/layers_dev.py`
|
||||
**Building Side:** Code exports to `tinytorch.core.layers`
|
||||
|
||||
```python
|
||||
@@ -21,7 +21,7 @@ sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||
from layers_dev import Dense, Tensor
|
||||
|
||||
# Import activation functions from the activations module
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), '..', 'activations'))
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(os.path.dirname(__file__)), '..', '02_activations'))
|
||||
from activations_dev import ReLU, Sigmoid, Tanh
|
||||
|
||||
def safe_numpy(tensor):
|
||||
@@ -20,7 +20,7 @@ from tinytorch.core.activations import ReLU, Sigmoid, Tanh
|
||||
|
||||
# Import the networks module
|
||||
try:
|
||||
from modules.networks.networks_dev import (
|
||||
from modules.04_networks.networks_dev import (
|
||||
Sequential,
|
||||
create_mlp,
|
||||
create_classification_network,
|
||||
@@ -32,7 +32,7 @@ try:
|
||||
)
|
||||
except ImportError:
|
||||
# Fallback for when module isn't exported yet
|
||||
sys.path.append(str(project_root / "modules" / "networks"))
|
||||
sys.path.append(str(project_root / "modules" / "04_networks"))
|
||||
from networks_dev import (
|
||||
Sequential,
|
||||
create_mlp,
|
||||
Reference in New Issue
Block a user