Here’s my attempt at the same problem: ANN: Tensars.jl: Tensors as linear mappings of multidimensional arrays
I think we have approached this from opposite sides. You’re looking for the closest thing to a mathematical tensor that will fit into a programing language, while I’m looking for the smallest and simplest extension of Julia that can calculate with tensors. Both approaches are worth pursuing.
I’m currently stuck on the suggestion from @mcabbot about identifying tensors with matrices. That led me down a rabbit hole of annotated arrays, broadcasting, matmul and structured matrix types. I should take some time off from that to do an MVP, and to implement the suggestions from @ChrisRackauckas on what’s required for tensors to work efficiently in Julia.
Good to see who else is working on it!