Description
The connect_
family of functions do diagram + arrow
as opposed to arrow + diagram
.
Line 66 in f4f4582
Line 94 in f4f4582
Line 40 in f4f4582
Since atop
or +
is not commutative, these have different output renderings and I've found a few use-cases for the latter. I think both are useful, and this is a feature request for specifying arrow + diagram
or diagram + arrow
through a switch.
To motivate the use-case with an example, left below is a reproduction of MultiHeadAttention
from the original paper (right).
One process declaratively specifying this diagram involves stacking ScaledDotProductAttention
(SDPA) for each head and the having Split
branch out to each heads. connect_outside
works for me here, but since I'm doing the connect after the stack is created - the arrows appear above, not honoring the depth dimension.
I have found some success for a custom Trail
based arrow - see arrow_outside_up_free
and arrow_outside_up
.
PS: I don't mean to pile on the issues here, I'm happy to help and bring in a PR myself following consensus with some guidance. Also if there are alternative recommended routes with existing primitives that solves the above problem - open to trying those as well. Thanks for building and maintaining the library!