Blog posts

2025

Faster Siamese Network Training and Inference

In this post, I look at a couple of ways you can dramatically speed up training of Siamese neural networks. These are two relatively simple tricks that I’ve not seen anywhere else which, when combined, can give a ~2.5x speed-up when training Siamese networks on GPU in PyTorch.

2023

Visualising the Legendre Transform

The Legendre transform is incredibly useful in a wide range of areas including physics, economics, statistics and machine learning. However, its definition can be somewhat opaque. In this post, we look at how we might gain intuition for how the definition works by constructing it from scratch in a visual way.