I'm wondering how to define a net function that will multiply matrices inside a tensor. For example, if $s$ and $t$ are tensors with shapes $\{a,b,c\}$ and $\{a,c,d\}$ respectively, for each $i\leq a$ the subtensors in $s$ and $t$ with first index $i$ form matrices of dimensions $b\times c$ and $c\times d$ respectively. Multiplying corresponding matrices in $s$ and $t$ would produce a new tensor with shape $\{a,b,d\}$.
Is there currently a way to do this in Mathematica using nn layers? DotLayer and ThreadingLayer have depth limitations that seem to prevent it.