That’s compelling as a demonstration of Julia’s expressiveness.
My next thought is: what would it look like in Python?
With and without a deep learning library.
I suspect it would be much shorter with and slightly longer without but I am not certain.