Designing lenses with numerical optimization. It's surprising how much layers of an optical systems are akin to layers of a neural network during training. If you use rays as inputs and refractive surfaces as layers, you can pretty much use standard pytorch!
I should write a blog post about it.