Implementing the Convolutional Neural Network U-Net in APL
summary
An end-to-end U‑Net is implemented in Dyalog APL from scratch, mapping the U topology into multi‑axis arrays, expressing convolutions as stencils and inner products, and encoding the flow with five arrow functions (CV, CC, MX, UP, C1). The code leverages stencil operator optimizations and a custom compiler backend; runtime and code‑size comparisons against a PyTorch reference show it runs at about 2× slower than PyTorch while remaining compact and workable.
AI-written summary · about
chapters (8)
- 0:00Introduction
- 2:26What is a U-net Convolutional Neutral Network (CNN)?
- 4:45Motivation and method
- 6:10How to arrange a u-net as matrices rectangular arrays
- 13:18What else did I learn?
- 13:52Inner products and axes
- 15:06Optimised cases of the stencil operator
- 20:23Conclusion: Understanding APL solutions gives you super powers
