CARD 01 · CONCEPT
Tensors, not arrays
A tensor is a NumPy array that can live on a GPU and remembers how to differentiate itself. Today we just need the CPU one.
slug: pytorch · 11 cards · ~25 min.
A tensor is a NumPy array that can live on a GPU and remembers how to differentiate itself. Today we just need the CPU one.
If you want PyTorch to track gradients, mark the tensor with requires_grad=True. Otherwise it's just a number.