Hmm... compilers, modules. That is honestly not too bad. Deep learning compiler expertise are in demand because of this kind of stuff.
Seriously just need to call them modules though I think. Tensors do not have non-linear activation functions. In most cases it is just slang for a n-box of numbers.
http://adam.chlipala.net/papers/AtlPOPL22/AtlPOPL22.pdf
Do I care? Eh.. Is the math and programming language stuff nice? Yeah.