mirror of
https://github.com/MLSysBook/TinyTorch.git
synced 2026-03-09 15:02:25 -05:00
Stage 5 of TinyTorch API simplification: - Created tinytorch.nn package with PyTorch-compatible interface - Added Module base class in nn.modules for automatic parameter registration - Added functional module with relu, flatten, max_pool2d operations - Created tinytorch.optim package exposing Adam and SGD optimizers - Updated main __init__.py to export nn and optim modules - Linear and Conv2d now available through clean nn interface Students can now write PyTorch-like code: import tinytorch.nn as nn import tinytorch.nn.functional as F model = nn.Linear(784, 10) x = F.relu(model(x))