theNotebook

Shelf two · The toolkit

PyTorch & TensorFlow

Intermediate · 1 min read · Three tellings

Kitchen table

If scikit-learn is a box of ready-made machines, these are the workshops where you build your own from parts. You snap together the layers like giant Lego, and the workshop does the two hard bits for you: it remembers every calculation you made, and it works out backwards which parts to adjust when the answer was wrong. The big brains, the ones that talk and see, all came out of workshops like these.

Whiteboard

Tensors, autograd and the training loop: define the forward pass, and the framework records the computation graph and differentiates it for you. That is the whole magic. PyTorch won the research mindshare with eager execution that debugs like ordinary Python. TensorFlow persists in production estates and on-device. Everything above them – the fine-tuning libraries, the serving stacks, the agent frameworks – is a convenience layer over these primitives, so when an abstraction leaks, this is the level you drop down to.

Boardroom

This is where deep learning models are actually built and trained, and for most organisations the strategic relevance is simple: these frameworks decide your hardware bill, because they are the reason the GPUs are on order. Unless you are training models yourself, your exposure is indirect, but if you are, know that the framework choice is also a hiring choice and a vendor-ecosystem choice, and that the scarce resource is not the software, which is free, but the people and the silicon.

layer 1layer 2layer 3inoutblame flows backwards
Snap the layers together. The workshop shares the blame backwards.

Keywords

  • PyTorch
  • TensorFlow
  • deep learning framework
  • GPU
  • tensors
  • autograd
  • training loop

Search the notebook