mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-05-06 17:57:31 -05:00
docs: Clean up whitespace and formatting in module READMEs
- Fixed trailing whitespace in several module README files - Ensures consistent formatting across all documentation
This commit is contained in:
@@ -75,7 +75,7 @@ jupyter notebook tensor_dev.ipynb
|
||||
|
||||
### Step-by-Step Implementation
|
||||
1. **Basic Tensor class** - Constructor and properties
|
||||
2. **Shape management** - Understanding tensor dimensions
|
||||
2. **Shape management** - Understanding tensor dimensions
|
||||
3. **Arithmetic operations** - Addition, multiplication, etc.
|
||||
4. **Utility methods** - Reshape, transpose, sum, mean
|
||||
5. **Error handling** - Robust edge case management
|
||||
@@ -95,7 +95,7 @@ print(f"Sum: {x.sum()}") # Should be 10.0
|
||||
# Export your tensor implementation
|
||||
tito export
|
||||
|
||||
# Test your implementation
|
||||
# Test your implementation
|
||||
tito test --module tensor
|
||||
```
|
||||
|
||||
|
||||
@@ -66,13 +66,13 @@ output = tanh(Tensor([0, 1, -1])) # [0, 0.76, -0.76]
|
||||
### Prerequisites
|
||||
Ensure you have completed the tensor module and understand basic tensor operations:
|
||||
|
||||
```bash
|
||||
```bash
|
||||
# Activate TinyTorch environment
|
||||
source bin/activate-tinytorch.sh
|
||||
source bin/activate-tinytorch.sh
|
||||
|
||||
# Verify tensor module is working
|
||||
tito test --module tensor
|
||||
```
|
||||
```
|
||||
|
||||
### Development Workflow
|
||||
1. **Open the development file**: `modules/source/03_activations/activations_dev.py`
|
||||
@@ -86,9 +86,9 @@ tito test --module tensor
|
||||
### Comprehensive Test Suite
|
||||
Run the full test suite to verify mathematical correctness:
|
||||
|
||||
```bash
|
||||
```bash
|
||||
# TinyTorch CLI (recommended)
|
||||
tito test --module activations
|
||||
tito test --module activations
|
||||
|
||||
# Direct pytest execution
|
||||
python -m pytest tests/ -k activations -v
|
||||
@@ -114,7 +114,7 @@ The module includes comprehensive educational feedback:
|
||||
# Visual feedback with plotting
|
||||
📊 Plotting ReLU behavior across range [-5, 5]...
|
||||
📈 Function visualization shows expected behavior
|
||||
```
|
||||
```
|
||||
|
||||
### Manual Testing Examples
|
||||
```python
|
||||
|
||||
@@ -51,10 +51,10 @@ for batch_images, batch_labels in train_loader:
|
||||
```python
|
||||
# Flexible interface supporting multiple datasets
|
||||
class Dataset:
|
||||
def __getitem__(self, index):
|
||||
def __getitem__(self, index):
|
||||
# Return (data, label) for any dataset type
|
||||
pass
|
||||
def __len__(self):
|
||||
def __len__(self):
|
||||
# Enable len() and iteration
|
||||
pass
|
||||
|
||||
|
||||
@@ -94,15 +94,15 @@ print(f"Complex gradient dy: {y.grad}")
|
||||
### Prerequisites
|
||||
Ensure you understand the mathematical building blocks:
|
||||
|
||||
```bash
|
||||
```bash
|
||||
# Activate TinyTorch environment
|
||||
source bin/activate-tinytorch.sh
|
||||
source bin/activate-tinytorch.sh
|
||||
|
||||
# Verify prerequisite modules
|
||||
tito test --module tensor
|
||||
tito test --module activations
|
||||
tito test --module layers
|
||||
```
|
||||
```
|
||||
|
||||
### Development Workflow
|
||||
1. **Open the development file**: `modules/source/08_autograd/autograd_dev.py`
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 🔥 Module: Training
|
||||
|
||||
## 📊 Module Info
|
||||
- **Difficulty**: ⭐⭐⭐⭐⭐ Expert
|
||||
- **Difficulty**: ⭐⭐⭐⭐ Expert
|
||||
- **Time Estimate**: 8-10 hours
|
||||
- **Prerequisites**: Tensor, Activations, Layers, Networks, DataLoader, Autograd, Optimizers modules
|
||||
- **Next Steps**: Compression, Kernels, Benchmarking, MLOps modules
|
||||
@@ -38,7 +38,7 @@ from tinytorch.core.metrics import Accuracy
|
||||
# Define complete model architecture
|
||||
model = Sequential([
|
||||
Dense(784, 128), ReLU(),
|
||||
Dense(128, 64), ReLU(),
|
||||
Dense(128, 64), ReLU(),
|
||||
Dense(64, 10), Softmax()
|
||||
])
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 🔥 Module: Compression
|
||||
|
||||
## 📊 Module Info
|
||||
- **Difficulty**: ⭐⭐⭐⭐⭐ Expert
|
||||
- **Difficulty**: ⭐⭐⭐⭐ Expert
|
||||
- **Time Estimate**: 8-10 hours
|
||||
- **Prerequisites**: Networks, Training modules
|
||||
- **Next Steps**: Kernels, MLOps modules
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# 🔥 Module: Kernels
|
||||
|
||||
## 📊 Module Info
|
||||
- **Difficulty**: ⭐⭐⭐⭐⭐ Expert
|
||||
- **Difficulty**: ⭐⭐⭐⭐ Expert
|
||||
- **Time Estimate**: 8-10 hours
|
||||
- **Prerequisites**: All previous modules (01-11), especially Compression
|
||||
- **Next Steps**: Benchmarking, MLOps modules
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# 🔥 Module: MLOps
|
||||
|
||||
## 📊 Module Info
|
||||
- **Difficulty**: ⭐⭐⭐⭐⭐ Expert
|
||||
- **Time Estimate**: 10-12 hours
|
||||
- **Difficulty**: ⭐⭐⭐⭐ Expert
|
||||
- **Time Estimate**: 8-10 hours
|
||||
- **Prerequisites**: All previous modules (01-13) - Complete TinyTorch ecosystem
|
||||
- **Next Steps**: **🎓 Course completion** - Deploy your complete ML system!
|
||||
|
||||
|
||||
Reference in New Issue
Block a user