📈PyTorch
Also known as Torch (Python), PyTorch Library
A free tool in Python. You use it to build and train neural networks.
Think of it like
It is like a box of building bricks for brains. You snap layers together and teach them.
Example
Emma builds a small image classifier in 40 lines of PyTorch. She moves it to a graphics card with one line, and it trains ten times faster.
Why it matters
Definition
Example code
python
import torch.nn as nn
model = nn.Sequential(nn.Linear(12, 64), nn.ReLU(), nn.Linear(64, 1))
print(model)Common mistake
Key takeaways
- 1Just Python. Networks are written as code.
- 2Gradients for you. It works out the math of learning.
- 3Any chip. CPU or graphics card, same code.