Reference · Glossary

PyTorch

Last updated

An open-source deep learning framework — the most widely used one for research and increasingly production — built around tensors (GPU-friendly arrays) and automatic differentiation for training neural networks.

#When to use

Building or fine-tuning a real neural network, especially anything beyond a toy — most published models and Hugging Face checkpoints are PyTorch-first.

#When not to

Classical ML on tabular data (a spreadsheet of rows and columns) — scikit-learn is simpler and usually a better fit than standing up a neural network.

#Example

import torch
import torch.nn as nn
model = nn.Linear(in_features=3, out_features=1)
x = torch.tensor([[0.2, 0.9, 0.4]])
print(model(x))